Templat:Kotak info kepulauan/panjang/doc
This is a subtemplate of {{Kotak info kepulauan}}, and should not be used directly.
Usage
Input | Output |
---|---|
{{Kotak info kepulauan/panjang|km=0.5}} |
0.5 km |
{{Kotak info kepulauan/panjang|mi=0.3}} |
0.3 mil (0.5 km) (mohon hapus nilai dalam mil [mi]) |
{{Kotak info kepulauan/panjang|m=500}} |
500 m |
{{Kotak info kepulauan/panjang|ft=1610}} |
1610 ft (491 m) (mohon hapus nilai dalam kaki [ft]) |
{{Kotak info kepulauan/panjang|km=0.5|mi=0.3}} |
0.5 km (mohon hapus nilai dalam mil [mi]) |
{{Kotak info kepulauan/panjang|m=500|ft=1610}} |
500 m (mohon hapus nilai dalam kaki [ft]) |
{{Kotak info kepulauan/panjang|km=0.5|m=500}} |
0.5 km |
{{Kotak info kepulauan/panjang|mi=0.3|ft=1610}} |
0.3 mil (0.5 km) (mohon hapus nilai dalam mil [mi]) |
{{Kotak info kepulauan/panjang|m=500|mi=0.3|ft=1610}} |
0.3 mil (0.5 km) (mohon hapus nilai dalam mil [mi]) |
{{Kotak info kepulauan/panjang|km=0.5|mi=0.3|ft=1610}} |
0.5 km (mohon hapus nilai dalam mil [mi]) |
{{Kotak info kepulauan/panjang|km=0.5|m=500|ft=1610}} |
0.5 km |
{{Kotak info kepulauan/panjang|km=0.5|m=500|mi=0.3}} |
0.5 km (mohon hapus nilai dalam mil [mi]) |
{{Kotak info kepulauan/panjang|km=0.5|m=500|mi=0.3|ft=1610}} |
0.5 km (mohon hapus nilai dalam mil [mi]) |
{{convert|0.5|km|abbr=on}}
→ 05 km (3,1 mi){{convert|0.3|mi|abbr=on}}
→ 03 mi (4,8 km){{convert|500|m|abbr=on}}
→ 500 m (1.600 ft){{convert|1610|ft|abbr=on}}
→ 1.610 ft (490 m)
Code
The code uses {{precision}} to determine the level of precision. The logic is to give preference to km/mi over m/ft. If both km and mi are specified, then no conversion takes place. Similarly, if both m and ft are specified (and km/mi are not specified), then no conversion takes place.
See also