Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{documentation subpage}}
{{documentation subpage}}
{{dependencies|Module:Convert|Module:Convert/data|Module:Convert/text}}
{{dependencies|Module:Convert|Module:Convert/data|Module:Convert/text|Template:Frac/styles.css|Template:Sfrac/styles.css}}
{{Uses TemplateStyles|Template:Fraction/styles.css|Template:Sfrac/styles.css}}
'''{{tl|convert}}''' calculates a measurement value (''number × unit'') into the same measurement by a different unit, and then presents the results, formatted.  See also the [[w:Module:Convert/documentation/conversion data|unit symbols recognized by this template]].
'''{{tl|convert}}''' calculates a measurement value (''number × unit'') into the same measurement by a different unit, and then presents the results, formatted.  See also the [[w:Module:Convert/documentation/conversion data|unit symbols recognized by this template]].


Line 179: Line 178:


==Ranges of values==
==Ranges of values==
{{hatnote|For a conversion of a difference, see [[#Units of difference]]}}
{{For|a conversion of a difference|#Units of difference}}
A ''range'' converts ''two'' values and separates them by your choice of words and punctuation.
A ''range'' converts ''two'' values and separates them by your choice of words and punctuation.


Line 343: Line 342:


===Wrapping and line breaking===
===Wrapping and line breaking===
:See [[w:Help:Convert#Wrapping and line breaking]]
:See {{section link|Help:Convert|Wrapping and line breaking}}


===<span id="million"></span>Spelling out "thousands", "millions", etc.===
===<span id="million"></span>Spelling out "thousands", "millions", etc.===
Line 808: Line 807:


==Parameter list==
==Parameter list==
{| class="wikitable sortable collapsible uncollapsed" style="width:100%;"
{{convert/doc/parameter list}}
! colspan=4 style="background:#eee" | '''Parameter options for <nowiki>{{convert}}</nowiki>'''
|-
! Parameter
! Value
! Description
! Note
|-
|<code>&#124;abbr=in</code> || data-sort-value="in" | <code>in</code>
| Use symbol for first (left-hand side) unit
| Unit display
|-
|<code>&#124;abbr=off</code> || data-sort-value="off" | <code>off</code>
| rowspan=2 | Use name for all units
| rowspan=2 | Unit display
|-
|<code>&#124;abbr=none</code> || data-sort-value="none" | <code>none</code>
|-
|<code>&#124;abbr=on</code> || data-sort-value="on" | <code>on</code>
| Use symbol for all units
| Unit display
|-
|<code>&#124;abbr=out</code> || data-sort-value="out" | <code>out</code>
| Use symbol for right-hand side unit (default)
| Unit display
|-
|<code>&#124;abbr=unit</code> || data-sort-value="unit" | <code>unit</code>
| Use symbol for all units when using scientific notation
| Unit display
|-
|<code>&#124;abbr=values</code> || data-sort-value="values" | <code>values</code>
| Omit both the input and output units: show only the numbers
| Unit display
|-
|<code>&#124;abbr=~</code> || data-sort-value="~" | <code>~</code>
| Shows both unit name and symbol
| Unit display
|-
|<code>&#124;adj=mid&#124;…</code> || data-sort-value="mid" | <code>mid</code>
| User-specified text after the input unit; sets <code>adj=on</code> (adjective). Expects 1 unnamed parameter.
| Word adding, adjective
|-
|<code>&#124;adj=on</code> || data-sort-value="on" | <code>on</code>
| Unit name is adjective (singular and hyphenated)
| Grammar, adjective
|-
|<code>&#124;adj=pre&#124;…</code> || data-sort-value="pre" | <code>pre</code>
| User-specified text before input unit. Expects 1 unnamed parameter.
| Word adding
|-
|<code>&#124;adj=ri0</code> || data-sort-value="ri0" | <code>ri0</code>
| Round input with precision 0
| Input precision
|-
|<code>&#124;adj=ri1</code> || data-sort-value="ri1" | <code>ri1</code>
| Round input with precision 1
| Input precision
|-
|<code>&#124;adj=ri2</code> || data-sort-value="ri2" | <code>ri2</code>
| Round input with precision 2
| Input precision
|-
|<code>&#124;adj=ri3</code> || data-sort-value="ri3" | <code>ri3</code>
| Round input with precision 3
| Input precision
|-
|<code>&#124;comma=5</code> || data-sort-value="05" | <code>5</code>
| Only use comma for thousands separator if 5 or more digits
| Number format
|-
|<code>&#124;comma=gaps</code> || data-sort-value="gaps" | <code>gaps</code>
| Use gaps (space), not comma, for thousands separator
| Number format
|-
|<code>&#124;comma=off</code> || data-sort-value="off" | <code>off</code>
| No thousands separator
| Number format
|-
|<code>&#124;disp=b</code> || data-sort-value="b" | <code>b</code>
| Join input and output using "&nbsp;(...)" (default)
| Join values
|-
|<code>&#124;disp=sqbr</code> || data-sort-value="sqbr" | <code>sqbr</code>
| Join input and output using "&nbsp;[...]"
| Join values
|-
|<code>&#124;disp=br</code> || data-sort-value="br" | <code>br</code>
| Join input and output using "&lt;br/>"
| Join values
|-
|<code>&#124;disp=comma</code> || data-sort-value="comma" | <code>comma</code>
| Join input and output using ",&nbsp;"
| Join values
|-
|<code>&#124;disp=or</code> || data-sort-value="or" | <code>or</code>
| Join input and output using "&nbsp;or&nbsp;"
| Join values
|-
|<code>&#124;disp=number</code> || data-sort-value="number" | <code>number</code>
| rowspan=2 | Display output number only
| rowspan=2 | Parts only
|-
|<code>&#124;disp=output number only</code> || data-sort-value="output number only" | <code>output number only</code>
|-
|<code>&#124;disp=out</code> || data-sort-value="out" | <code>out</code>
| rowspan=2 | Display only output number and name/symbol
| rowspan=2 | Parts only
|-
|<code>&#124;disp=output only</code> || data-sort-value="output only" | <code>output only</code>
|-
|<code>&#124;disp=preunit&#124;…[&#124;…]</code> || data-sort-value="preunit" | <code>preunit</code>
| Text to be inserted after value and before units, for both input and output, with optionally different text for output.  Expects 1 or 2 unnamed parameters.
| Word adding
|-
|<code>&#124;disp=table</code> || data-sort-value="table" | <code>table</code>
| Output is suitable for a table cell with align="right"
| Table columns
|-
|<code>&#124;disp=tablecen</code> || data-sort-value="tablecen" | <code>tablecen</code>
| Output is suitable for a table cell with align="center"
| Table columns
|-
|<code>&#124;disp=unit</code> || data-sort-value="unit" | <code>unit</code>
| Display input name/symbol only (not input number, not output)
| Parts only
|-
|<code>&#124;disp=unit2</code> || data-sort-value="unit2" | <code>unit2</code>
| Display output name/symbol only (not input; not output number)
| Parts only
|-
|<code>&#124;disp=x&#124;…</code> || data-sort-value="x" | <code>x</code>
| Join input and output using user-specified text
| Word adding
|-
|<code>&#124;frac=''N''</code> || data-sort-value="N" | <code>''N''</code>
| Show imperial number in fractions, denominator=''N''
| Number format, fraction
|-
|<code>&#124;lk=in</code> || data-sort-value="in" | <code>in</code>
| Link left-hand side unit name or symbol
| Unit link
|-
|<code>&#124;lk=on</code> || data-sort-value="on" | <code>on</code>
| Link all unit names or symbols (but not twice for the same unit)
| Unit link
|-
|<code>&#124;lk=out</code> || data-sort-value="out" | <code>out</code>
| Link right-hand side unit name or symbol
| Unit link
|-
|<code>&#124;order=flip</code> || data-sort-value="flip" | <code>flip</code>
| Inverts order of input, output measurements (conversion first)
| Order
|-
|<code>&#124;order=out</code> || data-sort-value="out" | <code>out</code>
| Displays output units in the order entered, skipping input unit
| Order
|-
|<code>&#124;round=5</code> || data-sort-value="05" | <code>5</code>
| Rounds calculation to the nearest multiple of 5
| Output precision
|-
|<code>&#124;round=25</code> || data-sort-value="25" | <code>25</code>
| Rounds calculation to the nearest multiple of 25
| Output precision
|-
|<code>&#124;round=each</code> || data-sort-value="each" | <code>each</code>
| In a range, each number is rounded by the default rounding
| Output precision
|-
|<code>&#124;sigfig=''N''</code> || data-sort-value="N" | <code>''N''</code>
| Round output number to ''N'' significant figures (''N'' is a positive integer)
| Output precision
|-
|<code>&#124;sortable=on</code> || data-sort-value="on" | <code>on</code>
| Adds invisible sort key
| Table sort
|-
|<code>&#124;sp=us</code> || data-sort-value="us" | <code>us</code>
| Use U.S. spelling ("meter" instead of default "metre")
| Spelling U.S.&nbsp;names
|-
|<code>&#124;spell=in</code> || data-sort-value="in" | <code>in</code>
| Spell input number in words
| Spelling numbers
|-
|<code>&#124;spell=In</code> || data-sort-value="In" | <code>In</code>
| Spell input number in words with first letter uppercase
| Spelling numbers
|-
|<code>&#124;spell=on</code> || data-sort-value="on" | <code>on</code>
| Spell input and output numbers in words
| Spelling numbers
|-
|<code>&#124;spell=On</code> || data-sort-value="On" | <code>On</code>
| Spell input and output numbers in words with first letter uppercase
| Spelling numbers
|-
|<code>&#124;$=&euro;</code> || data-sort-value="&euro;" | <code>&euro;</code>
| Replace $-sign with a currency sign, for example in <code>&euro;/hectare</code>
| Cost per unit<br /> {{nowrap|No currency conversion happens}}
|-
|<code>&#124;debug=yes</code> || data-sort-value="yes" | <code>yes</code>
| '''Debugging only'''. In a sortable table: show the normally hidden sort key
| Table sort


|}


==TemplateData==
{{TemplateData header}}


==TemplateData==
<templatedata>
<templatedata>
{
{
Please note that all contributions to skyHow are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) (see skyHow:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)