289
edits
Changes
no edit summary
{| class="wikitable"
|'''Input'''||'''Displays as'''
|-
|<nowiki>{{convert|3.2132|kgm|lbft|0}}</nowiki>||{{convert|3.2132|m|kgft|lb0}}
|-
|<nowiki>{{convert|3.2118|kg°C|lb°F|01}}</nowiki>||{{convert|3.2118|kg°C|lb°F|01}}
|-
|<nowiki>{{convert|10|kg mi|lb km|disp=or0}}</nowiki>||{{convert|10|kg mi|lb km|disp=or0}}
|-
|<nowiki>{{convert|625|ftkm|5mi|in|m0}}</nowiki>||{{convert|625|ftkm|5mi|in|m0}}<!--This is currently broken, see talk page
|-
|<nowiki>{{convert|21|mlb|ftinkg|0}}</nowiki>||{{convert|21|mlb|ftinkg|0}}-->
|-
|<nowiki>{{convert|101250|misqft|sqm|1|lk=on}}</nowiki>||{{convert|101250|sqft|sqm|1|lk=on}} |- |<nowiki>{{convert|20.5|sqkm|sqmi|1|lk=on|abbr=on}}</nowiki>||{{convert|20.5|sqkm|sqmi|1|lk=on|miabbr=on}}
|-
|<nowiki>{{convert|100641|mpgusacre|sqmi|3|lk=on|abbr=on}}</nowiki>||{{convert|100641|acre|sqmi|3|lk=on|mpgusabbr=on}}
|-
|<nowiki>{{convert''However''|120|km/h}}</nowiki>||{{convert|120|km/h}}
|-
|<nowiki>{{convert|18641|°Cacre|°F}}</nowiki>sqmi||{{convert|18|°C|°F}}|-| <nowiki>{{convert|1250|sqft|m2|lk=in|sigfig=2}}</nowiki> ||{{convert|1250|sqft|m2|lk=in|sigfig=2}}<br/>Note 'lk=in' links only the input unit. This example is for illustration only, common units of measurement should not be linked. See: [[Wikipedia:Only make links that are relevant to the context|wp:overlink]].|- |<nowiki>{{convert|20.5|m3|cuyd|lk=out|abbr=on}}</nowiki>||{{convert|20.5|m3|cuyd|1|lk=out|abbr=on}}<br/>Note 'lk=out' links only the output unit, [[cu yd]].|-|<nowiki>{{convert|641|acre|km2 sqmi|lk=on}}</nowiki>||{{convert|641|acre|km2 sqmi|lk=on}}<br/>Note 'lk=on' links all units. Per guidelines, common units should not be linked. See: [[Wikipedia:Only make links that are relevant to the context|wp:overlink]].|-|<nowiki>{{convert|641|acre|km2 sqmi|2|lk=on}}</nowiki>||{{convert|641|acre|km2 sqmi|2|lkabbr=on}}<br/> Although because 640 acres equals 1 one square mile; 641 acres rounded to two decimal places equals 2 would equal 1.00 sq mi. Therefore it is displayed as 1 sq mi.
|}
===Tricks=Range of values====:''Note: not yet operational for all units''
{| class="wikitable"
|-
! colspan="2" |<nowikibig>{{convert|60|and|170|kg|lb}}'''In order to...'''</nowikibig>||{{convert|60|and|170|kg|lb}}
|-
|Use [[United States|U.S.]] spelling || attach <code><nowiki>{{convert|60|to|170|kg|lb}}sp=us</nowiki>||{{convert|60|to|170|kg|lb}}</code>
|-
|<nowiki>{{convert|60|toMake units [[Wikipedia:Manual of Style (-links)|170wikilinked]] |kg|lb}}attach <code><nowiki>|lk=on</nowiki></code> (The [[WP:MOS||{{convert|60|to(-manual of style]] suggests that you only link the first instance)|170|kg|lb}}.
|-
|Use the singular for grammar || attach <code><nowiki>{{convert|60|-|170|kg|lb}}sing=on</nowiki>||{{convert|60|-|170|kg|lb}}</code> (ex: "The 190 foot (58 m) bridge" as opposed to "feet")
|-
|Abbreviate all units || attach <code><nowiki>{{convert|41|to|50|F|C}}abbr=on</nowiki>||{{convert|41|to|50|F|C}}</code>
|-
|<nowiki>{{convertUse a / instead ( ) |41|-|50 |F|K}}attach </nowikicode>||{{convert|41|-|50 |F|K}}|-|<nowiki>{{convert|60|by|120|m|ft}}disp=slash</nowiki>||{{convert|60|by|120|m|ft}}|-|<nowiki>{{convert|60|x|120|m|ft}}</nowikicode>||{{convert|60|x|120|m|ft}}|-|(or shorthand: <nowikicode>{{convert|60|+/-|10|m|ft}}</nowiki>||{{convert|60|+disp=/-|10|m|ft}}|-|<nowiki>{{convert|19|to|27|L|USgal}}</nowiki>||{{convert|19|to|27|L|USgal}}|-|<nowiki>{{convert|5|to|7|L|USgal|abbr=mos}}</nowikicode>||{{convert|5|to|7|L|USgal|abbr=mos}}|-|<nowiki>{{convert|4|-|9|L|USgal|abbr=none}}<) (ex: 190 foot/nowiki>||{{convert|4|-|9|L|USgal|abbr=none}}58 m)|}<!--NOTE: rows require "nowiki", using {{ disappears. -->
===Rounding===The following conversions are currently not available as a range number given for rounding rounds off the result to the power of values:*Some imperial 1/10 the rounding number. For instance, if the result is 8621 and US gallonthe round number is '-based units*Fuel consumption units (mpg2', L/100km)<!-- except with <code>|abbr=on</code> no links the result will be 8600. If the result is '234.0283043' and default <code>|disp=</code> -->*Large scale units (e3the round number is '0', e6, e9)*Combination-based units (ft&in, st&lb, lb&oz) due to complexity of the conversionresult will be 234.
===Parameters=Conversions ==The abbreviations to the right of the units are the abbreviations that can be entered when using the template. Through various revisions of this template, some units have incorporated multiple abbreviations to make the code more flexible for editors, e.g. °F ''or'' F may be entered. Though they may not be the correct abbreviations, the ''correct abbreviation'' will always be displayed when you use {{tl|convert}}.----
{| class="wikitable"
|-
! colspan="25" | Parameters<big>Units supported by {{tl|convert}}</big>
|-
| {{anchor'''system''' || '''unit''' || '''abbreviation ''used in coding'''''<br> (alternative abbreviations) || '''abbreviation ''printed''''' ||sp_us}}Use [[Image:Flag of the United States.svg|US20px]] '''US spelling || attach ''' <code><nowiki>|sp=us</nowiki></code>
|-
! colspan="5" style="font-size: 110%; text-align: left;" | {{anchor'''Area'''|lk_in}}Make units - style="font-size: 90%;"| style="text-align: center;" | '''[[Wikipedia:Manual International System of Style (links)Units|wikilinkedSI]] ''' || attach <code><nowiki>[[square metre]] |lk| sqm || m² || square meter|- style=on</nowiki></code> "font-size: 90%;"| style="text-align: center;" | → || [[square kilometre]] || sqkm || km² || square kilometer|- style="font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | '''[[Imperial system|Imperial]] & [[United States customary units|U.S. to link all units{{in5Customary]]''' |31}}| [[acre]] || acre || acre (defaultor acres) |||- style="font-size: <tt>lk90%; background-color: #FFFFFF;"| style=off</tt>)<br> attach <code><nowiki>"text-align: center;" |lk→ || [[square foot]] ||sqft || sq ft |||- style=in</nowiki></code> "font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | → || [[square yard]] ||sqyd || sq to link only the input units<br> attach <code><nowiki>yd |lk||- style=out</nowiki></code>"font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | → || [[square mile]] || sqmi || sq to link only the output units<br>(The mi |||- style="font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | → || [[Wikipediasquare nautical mile]] || sqnmi || sq nmi |||- style="font-size:Only make links that are relevant to the context90%;"|manual of style="text-align: center;" | '''old metric''' || [[hectare]] suggests that you should not link common units of measurement).|| ha || ha ||
|-
! colspan="5" style="font-size: 110%; text-align: left;" | {{anchor'''Length'''|adj_on}}Use the adjective form - style="font-size: 90%;"|style="text-align: center;" | attach <code><nowiki>'''SI''' |adj| [[millimetre]] || mm || mm || millimeter|- style=on</nowiki></code> (e"font-size: 90%;"| style="text-align: center;" | → || [[centimetre]] || cm || cm || centimeter|- style="font-size: 90%;"| style="text-align: center;" | → || [[metre]] || m || m || meter|- style="font-size: 90%;"| style="text-align: center;" | → || [[kilometre]] || km || km || kilometer|- style="font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | '''Imperial & U.gS. Customary''' || [[inch]] || in || in |||- style="The 190font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | → || [[foot (58 munit of length) bridge|foot]] || ft || ft |||- style=" as opposed to font-size: 90%; background-color: #FFFFFF;"The 190 feet...| style="). This produces the adjective form—the unit name in the singular with a hyphen (according to the text-align: center;" | → || [[WPyard]] || yd || yd |||- style="font-size:HYPHEN90%; background-color: #FFFFFF;"|Manual of Stylestyle="text-align: center;" | → || [[mile]]).|| mi || mi |||- style="font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | → || [[nautical mile]] || nmi || nmi |||- style="font-size: 90%;"| style="text-align: center;" | '''Other''' || [[astronomical unit]] || AU || AU ||
|-
! colspan="5" style="font-size: 110%; text-align: left;" | {{anchor'''Speed'''|abbr_on}}Abbreviate units, or none - style="font-size: 90%;"|style="text-align: center;" | attach <code><nowiki>'''SI''' |abbr=on<| [[metres per second]] || m:s (m/nowiki><s) || m/code>{{in5s |7}}to show unit symbols{{in5|10}}(defaultmeter per second|- style="font-size: <tt>abbr90%;"| style=off<"text-align: center;" | → || [[kilometres per hour]] || km:h (km/tt>h ''or'' kph)<br> attach <code><nowiki>|abbr=none</nowiki><| km/code> h || kilometer per hour|- style="font-size: 90%; background-color: #FFFFFF;"| style="text-align: center;" | '''Accepted ''non''-SI''' || [[knot (speed)|knot]] || knot || kt |||- style="font-size: 90%;"| style="text-align: center;" | '''Imperial & U.S. to show all units in full words<br> attach <code><nowiki>Customary''' |abbr=in<| [[feet per second]] || ft:s (ft/nowiki><s) || ft/code> {{in5}} to abbreviate input units<br> attach <code><nowiki>s |abbr||- style=out<"font-size: 90%;"| style="text-align: center;" | → || [[miles per hour]] || mi:h (mph ''or'' mi/nowiki></code>{{in5}}to abbreviate output units.h) || mph ||
|-
|}
====Parameters still under construction===={| class="wikitable"|-! colspan="2" | Parameters still under construction. May not work in all situations|-|disp=tablecen||Similar to disp=table except that the values with be centered within the column. See the tables at [[La Nouvelle branch]] for in use examples.|-|disp=comma||Similar to disp=s except the two values will be separated by a comma, for situations where the first value is already within parentheses. See the Geography tables on [[Labrador]] for an example.|-|abbr=in||Abbreviates only the input unit.|-|abbr=out||Abbreviates only the output unit.|-|abbr=comma||Abbreviates (removes) commas. This is a limited, temporary option, until comma=off can be implemented. For ranges, using abbr=comma conflicts with internal options, so instead, append "nocomma" to a range-word: tonocomma, bynocomma, andnocomma, -nocomma & xnocomma.|-|abbr=mos||For ranges, abbreviates as in [[WP:MOS]], with the input unit repeated, twice.|} ===Rounding===''Convert'' supports four types of rounding:;Rounding to a given precision :Specify the desired precision with the fourth unnamed parameter or third unnamed parameter in the case where the ''convert to'' parameter is skipped (see above). The conversion is rounded off to the nearest power of 1Example/10 this number. For instance, if the result is 8621 and the round number is '-2', the result will be 8600. If the result is '234.0283043' and the round number is '0', the result will be 234. ;Rounding to a given number of significant figures:Specify the desired number of significant figures using <code><nowiki>|sigfig={some non-negative integer}</nowiki></code> as noted above. ;Combine both of the above:If both the desired precision and the desired number of significant figures are specified, the conversion will be rounded to the least precise of these. ;Default rounding:If neither the desired precision nor the desired number of significant figures are specified, the conversion will be rounded either to a comparable precision as the input value (the number of digits after the decimal point—or the negative of the number of non-significant zeroes before the point—is increased by one if the conversion is a multiplication by a number between 0.02 and 0.2, remains the same if the factor is between 0.2 and 2, is decreased by 1 if it is between 2 and 20, and so on) or to two significant figures, whichever is the most precise. An exception to this is temperature wherein the conversion will be rounded either to precision comparable to that of the input value or to that which would give three significant figures when expressed in kelvins, whichever is the most precise. === Units supported === {{selfref|See also: [[Template:Convert/list of units|Convert/list of units]]}}The table below lists units supported by this template. It is divided up according to the quantity being measured. Not all supported units are listed here; there are links to complete lists for each quantity. The codes listed in the ''code'' column (column 3) are accepted as input by the template.These can be used as the second or third unnamed parameter. For some units there exist alternative codes. These are listed in brackets and have been incorporated to make the code more flexible for editors, e.g. °F ''or'' F may be entered. The codes listed in the ''combinations'' column (column 7) can be used to produce multiple conversions. They can only be used as the third unnamed parameter, e.g. <code><nowiki>{{convert|55|nmi|km mi}}</nowiki></code> produces "{{convert|55|nmi|km mi}}". <div style="height: 400px; overflow: auto; padding: 3px; border: 1px solid #aaa;">{{Convert/list of units}}</div> ===Examples=monitor page==* Monitor quality or look at examples at {{tl|[[Template:Convert/check}}. ===See also===* {{tl|convinfobox}} for use in infoboxes* {{tl|bbl to t}} for converting barrel of oil to tonnes* {{tl|CwtQtrLb to kg}} for converting long hundred weights, quarters and pounds into kilograms* {{tl|DMS2Deg}} for converting degrees, minutes and seconds to decimal degrees* {{tl|HMS2Deg}} for converting [[hour angle]]s, given in hours, minutes and seconds, to decimal degrees* {{t1|height}} for converting and displaying a person's height* {{tl|miles-chains}} for converting miles and chains to kilometres linking "chains"* {{tl|pop density}} for converting a population and area to a density* {{tl|Inflation}} for calculating inflated prices* {{tl|metricate}}
<includeonly>
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:SI unit templates|{{PAGENAME}}]]
[[Category:Conversion templates| ]]
<!-- ADD INTERWIKIS BELOW THIS LINE -->
[[no:Mal:Convert]]
[[zh:Template:Convert]]
</includeonly>