Template:Convert/doc: Difference between revisions

From The World of Gotha
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 34: Line 34:
| square feet || sqft<br />sq ft || square meter || {{convert|10|sqft}}
| square feet || sqft<br />sq ft || square meter || {{convert|10|sqft}}
|-
|-
| rowspan="7" | '''Length''' || kilometer || km || mile || {{convert|10|km}}
| rowspan="9" | '''Length''' || kilometer || km || mile || {{convert|10|km}}
|-
|-
| mile || mi || kilometer || {{convert|10|mi}}
| mile || mi || kilometer || {{convert|10|mi}}
Line 44: Line 44:
| yard || yd || meter || {{convert|10|yd}}
| yard || yd || meter || {{convert|10|yd}}
|-
|-
| milimeter || mm || inch || {{convert|10|mm}}
| centimeter || cm || inch || {{convert|10|cm}}
|-
| inch || in cm || centimeter || {{convert|10|in cm}}
|-
| milimeter || mm || inch || {{convert|100|mm}}
|-
|-
| inch || in || milimeter || {{convert|10|in}}
| inch || in || milimeter || {{convert|10|in}}
|-
|-
| rowspan="6" | '''Mass''' || kilogram || kg || pound || {{convert|10|kg}}
| rowspan="6" | '''Mass''' || tonne (metric ton) || t || short ton (US ton) || {{convert|10|t}}
|-
|-
| pound || lb || kilogram || {{convert|10|lb}}
| short ton (US ton) || ST || tonne (metric ton) || {{convert|10|ST}}
|-
|-
| tonne (metric ton) || t || short ton (US ton) || {{convert|10|t}}
| kilogram || kg || pound || {{convert|10|kg}}
|-
|-
| short ton (US ton) || ST || tonne (metric ton) || {{convert|10|ST}}
| pound || lb || kilogram || {{convert|10|lb}}
|-
|-
| gram || g || ounce || {{convert|100|g}}
| gram || g || ounce || {{convert|100|g}}
Line 63: Line 67:
|-
|-
| miles per hour || mph || kilometers per hour || {{convert|10|mph}}
| miles per hour || mph || kilometers per hour || {{convert|10|mph}}
|-
| rowspan="2" | '''Temperature''' || celsius || c || farenheit || {{convert|10|c}}
|-
| farenheit || f || celsius || {{convert|10|f}}
|-
| rowspan="4" | '''Volume''' || liter || l || US gallon || {{convert|10|l}}
|-
| US gallon || gal || liter || {{convert|10|gal}}
|-
| mililiter || ml || US fluid ounce || {{convert|100|ml}}
|-
| US fluid ounce || floz<br />fl oz || mililiter || {{convert|10|floz}}
|}
|}

Revision as of 21:36, 24 September 2024

This is a documentation subpage for Template:Convert.
It may contain usage information, categories and other content that is not part of the original template page.
Shortcut
{{cvt}}

The {{convert}} template calculates the value of a measurement in one unit from the value of another unit and presents a formatted result. The result can be rounded.

Usage

  • Basic usage: {{convert|1|2}}
  • Full usage: {{convert|1|2|3}}

Parameters

Parameter Description Type Status Notes
1 Measurement value Numeric Required May be formatted or unformatted
2 Measurement unit String Required Use the unit code from supported units below
3 Rounding Numeric Optional Defaults to 0, the nearest integer. Setting a positive number adds decimal places. Setting a negative number rounds to the left of the decimal point (e.g., tens, hundreds, thousands, etc.).

Supported units

Type Unit Unit code Calculated unit Sample default result
Area square kilometer km2 square mile 10 km2 (4 sq mi)
square mile sqmi
sq mi
square kilometer 10 sq mi (26 km2)
square meter m2 square feet 10 m2 (108 sq ft)
square feet sqft
sq ft
square meter 10 sq ft (1 m2)
Length kilometer km mile 10 km (6 mi)
mile mi kilometer 10 mi (16 km)
meter m feet 10 m (33 ft)
feet ft meter 10 ft (3 m)
yard yd meter 10 yd (9 m)
centimeter cm inch 10 cm (4 in)
inch in cm centimeter 10 in (25 cm)
milimeter mm inch 100 mm (4 in)
inch in milimeter 10 in (254 mm)
Mass tonne (metric ton) t short ton (US ton) 10 t (11 ST)
short ton (US ton) ST tonne (metric ton) 10 ST (9 t)
kilogram kg pound 10 kg (22 lb)
pound lb kilogram 10 lb (5 kg)
gram g ounce 100 g (4 oz)
ounce oz gram 10 oz (284 g)
Speed kilometers per hour km/h miles per hour 10 km/h (6 mph)
miles per hour mph kilometers per hour 10 mph (16 km/h)
Temperature celsius c farenheit 10 °C (50 °F)
farenheit f celsius 10 °F (−12 °C)
Volume liter l US gallon 10 l (3 gal)
US gallon gal liter 10 gal (38 l)
mililiter ml US fluid ounce 100 ml (3 fl oz)
US fluid ounce floz
fl oz
mililiter 10 fl oz (296 ml)