Template:Milesoverkm/doc
Jump to navigation
Jump to search
| This is a documentation subpage for Template:Milesoverkm. It may contain usage information, categories and other content that is not part of the original template page. |
This template creates a sortable pair of measurements with the length in miles centered over the equivalent length in kilometers for use in a table.
Use
[edit source]The syntax of this template is:
{{miokm|var1|var2|var3}}
where:
var1is the length in milesvar2is the optional number of decimal places for miles {default=0)var3is the optional number of decimal places for kilometers (default=var2)
Examples
[edit source]| code | result |
|---|---|
{{miokm|123.456}}
|
123 miles
199 km |
{{miokm|123.456|1}}
|
123.5 miles
198.7 km |
{{miokm|123.456|2|1}}
|
123.46 miles
198.7 km |
{{miokm|123.456|-1|note=This example rounds to tens.}}
|
120 miles
200 km[a] |
Note
[edit source]- ^ This example rounds to tens.
See also
[edit source]- For help with this userbox template, please post a comment on the template talk page with a
{{reply to}}one or more of the previous editors. - This template invokes Template:Round and Template:Sort.