Difference between revisions of "Template:Mi to km/doc"

From Teampedia
Jump to: navigation, search
Line 6: Line 6:
 
;Examples:
 
;Examples:
 
:''[[WP:MOSNUM#Units of measurement|Manual of Style]] notation'':<nowiki>{{convert|mi to km|100}}</nowiki>&nbsp;&rarr; {{convert|mi to km|100}}
 
:''[[WP:MOSNUM#Units of measurement|Manual of Style]] notation'':<nowiki>{{convert|mi to km|100}}</nowiki>&nbsp;&rarr; {{convert|mi to km|100}}
:''Short notation'': <nowiki>{{mi to km|100|abbr=yes}}</nowiki>&nbsp;&rarr; {{convert|mi to km|100|abbr=yes}}
+
:''Short notation'': <nowiki>{{convert/mi to km|100|abbr=yes}}</nowiki>&nbsp;&rarr; {{convertmi to km|100|abbr=yes}}
 
:''Full notation'': <nowiki>{{convert|mi to km|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}}</nowiki>&nbsp;&rarr; {{convert|mi to km|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}}
 
:''Full notation'': <nowiki>{{convert|mi to km|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}}</nowiki>&nbsp;&rarr; {{convert|mi to km|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}}
  

Revision as of 12:52, 8 February 2020

Usage
{{convert|mi to km | num | abbr= | spell= | precision= | wiki=}}
Examples
Manual of Style notation:{{convert|mi to km|100}} → mi to km  (Expression error: Unrecognized word "mi". )
Short notation: {{convert/mi to km|100|abbr=yes}} → Template:Convertmi to km
Full notation: {{convert|mi to km|num=100|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → mi to km  (Expression error: Unrecognized word "mi". )

Italicized parameters are optional:

  • num or num= is a required parameter, which specifies the number of miles to be converted to kilometers. Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • abbr= can take values of either mos, yes, or no. Mos will show the names of the units as specified in the Manual of Style for dates and numbers (miles, km); yes will show the abbreviated names of the units (mi, km); and no will show the full names of the units (miles, kilometers). The default value is mos.
  • spell= can take values of American or Commonwealth and is only meaningful when abbr is set to no. American will use "kilometers", and Commonwealth—"kilometres". The default value is American.
  • precision= is the number of decimal digits in the converted value. The default value is 0.
  • wiki= specifies whether the names of the units should be wikified or not and can take values of either yes or no. The default value is no.

Capitalization of the parameters is unimportant.

See also