Jump to content

ଛାଞ୍ଚ:Infobox islands/length/doc

ଉଇକିପିଡ଼ିଆ‌ରୁ

This is a subtemplate of {{Infobox islands}}, and should not be used directly.

Input Output
{{Infobox islands/length|km=0.5}} ୦.୫ km (୦.୩୧ mi)
{{Infobox islands/length|mi=0.3}} ୦.୩ mi (୦.୫ km)
{{Infobox islands/length|m=500}} ୫୦୦ m (୧,୬୦୦ ft)
{{Infobox islands/length|ft=1610}} ୧,୬୧୦ ft (୪୯୧ m)
{{Infobox islands/length|km=0.5|mi=0.3}} ୦.୫ km (୦.୩ mi)
{{Infobox islands/length|m=500|ft=1610}} ୫୦୦ m (୧,୬୧୦ ft)
{{Infobox islands/length|km=0.5|m=500}} ୦.୫ km (୦.୩୧ mi)
{{Infobox islands/length|mi=0.3|ft=1610}} ୦.୩ mi (୦.୫ km)
{{Infobox islands/length|m=500|mi=0.3|ft=1610}} ୦.୩ mi (୦.୫ km)
{{Infobox islands/length|km=0.5|mi=0.3|ft=1610}} ୦.୫ km (୦.୩ mi)
{{Infobox islands/length|km=0.5|m=500|ft=1610}} ୦.୫ km (୦.୩୧ mi)
{{Infobox islands/length|km=0.5|m=500|mi=0.3}} ୦.୫ km (୦.୩ mi)
{{Infobox islands/length|km=0.5|m=500|mi=0.3|ft=1610}} ୦.୫ km (୦.୩ mi)
  • {{convert|0.5|km|abbr=on}} → 0.5 km (0.31 mi)
  • {{convert|0.3|mi|abbr=on}} → 0.3 mi (0.48 km)
  • {{convert|500|m|abbr=on}} → 500 m (1,600 ft)
  • {{convert|1610|ft|abbr=on}} → 1,610 ft (490 m)

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.