Template:Convert

From Wikipedia, the free encyclopedia

{{{1}}}  (Expression error: Unrecognised punctuation character "{" )

This template employs intricate features of template syntax.
Please do not alter it unless you are certain to understand its setup and parser functions and are ready to repair/revert all collateral damage if results are unexpected.
Any experiments should be conducted and all improvements tested in the template sandbox, or in your user space, before applying anything here.
The template documentation below is transcluded from Template:Convert/doc [edit]

[edit] Purpose

To show quantities in a primary and secondary display, such as 32 metres (105 ft), or 18 °C (64.4 °F).

[edit] Usage

{{convert|original_value|original_unit|conversion_unit|round_to}}

[edit] Tricks

In order to...
Use U.S. spelling attach |sp=us.
Make units wikilinked attach |lk=on. The manual of style suggests that you only link the first instance.
Use the singular for grammar attach |sing=on. (ex: "The 190 foot (58 m) bridge" as opposed to "feet")
Abbreviate all units attach |abbr=on.

[edit] Rounding

The number given for rounding rounds off the result to the power of 1/10 the rounding number. For instance, if the result is 8621 and the round number is '-2', the result will be 8700. If the result is '234.0283043' and the round number is '0', the result will be 234.

[edit] Conversions

The abbreviations to the right of the units are the abbreviations you should enter when using the template. Though they are not correct abbreviaions, the correct abbreviation will be displayed when you use {{convert}}.


Units supported by {{convert}}
system unit abbreviation used in coding abbreviation printed US spelling |sp=us
Area
SI square metre sqm square meter
square kilometre sqkm km² square kilometer
Customary acre acre acre
square foot sqft ft²
square yard sqyd yd²
square mile sqmi mi²
square nautical mile sqnmi nmi²
old metric hectare ha ha
Length
SI millimetre mm mm millimeter
centimetre cm cm centimeter
metre m m meter
kilometre km km kilometer
Customary inch in in
foot ft ft
yard yd yd
mile mi mi
nautical mile nmi nmi
Other astronomical unit AU AU
Speed
SI metres per second m:s m/s meter per second
kilometres per hour km:h km/hr kilometer per hour
Accepted non-SI knot kt kt
Customary feet per second ft:s ft/s
miles per hour mi:h mi/hr
Temperature
SI kelvin K K
degrees Celsius °C °C
Customary degrees Rankine °R °R
degrees Fahrenheit °F °F

[edit] Example/monitor page

Monitor quality or look at examples at Template:Convert/check

In other languages