Template:Convert: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Drumguy8800
hmm
Ookami (talk | contribs)
m 131 revisions imported
 
(106 intermediate revisions by 26 users not shown)
Line 1: Line 1:
{{formatnum:{{{1}}}}} {{#switch: {{{lk|}}}|on=[[{{#switch: {{{2|}}}
<includeonly>{{{{{|safesubst:}}}#invoke:convert|convert}}</includeonly><noinclude>
    |acre= acre{{#ifeq:{{{1}}}|1||{{!}}acres}}
{{documentation}}
    |ft=  foot (unit of length){{!}}{{#ifeq:{{{1}}}|1|foot|feet}}
<!-- Add categories to the /doc subpage, interwikis to Wikidata, not here -->
    |ha=  hectare{{#ifeq:{{{1}}}|1||{{!}}hectares}}
</noinclude>
    |sqft= square foot{{!}}square {{#ifeq:{{{1}}}|1|foot|feet}}
    |m=    {{#switch: {{{sp|}}}|us=meter|=metre}}{{#ifeq:{{{1}}}|1||{{!}}{{#switch: {{{sp|}}}|us=meters|=metres}}}}
    |km=  {{#switch: {{{sp|}}}|us=kilometer|=kilometre}}{{#ifeq:{{{1}}}|1||{{!}}{{#switch: {{{sp|}}}|us=kilometers|=kilometres}}}}
    |mi=  mile{{#ifeq:{{{1}}}|1||{{!}}miles}}
    |sqm=  square {{#switch: {{{sp|}}}|us=meter|=metre}}{{#ifeq:{{{1}}}|1||{{!}}square {{#switch: {{{sp|}}}|us=meters|=metres}}}}
    |sqkm= square kilometre{{#ifeq:{{{1}}}|1||{{!}}square kilometres}}
    |sqmi= square mile{{#ifeq:{{{1}}}|1||{{!}}square miles}}
    }}]]|={{#switch: {{{2|}}}
    |acre= {{#ifeq:{{{1}}}|1|acre|acres}}
    |ft=  {{#ifeq:{{{1}}}|1|foot|feet}}
    |ha=  {{#ifeq:{{{1}}}|1|hectare|hectares}}
    |sqft= {{#ifeq:{{{1}}}|1|square foot|square feet}}
    |m=    {{#ifeq:{{{1}}}|1|{{#switch: {{{sp|}}}|us=meter|=metre}}|{{#switch: {{{sp|}}}|us=meters|=metres}}}}
    |km=  {{#ifeq:{{{1}}}|1|{{#switch: {{{sp|}}}|us=kilometer|=kilometre}}|{{#switch: {{{sp|}}}|us=kilometers|=kilometres}}}}
    |mi=  {{#ifeq:{{{1}}}|1|mile|miles}}
    |sqm=  {{#ifeq:{{{1}}}|1|square {{#switch: {{{sp|}}}|us=meter|=metre}}|square {{#switch: {{{sp|}}}|us=meters|=metres}}}}
    |sqkm= {{#ifeq:{{{1}}}|1|square {{#switch: {{{sp|}}}|us=kilometer|=kilometre}}|square {{#switch: {{{sp|}}}|us=kilometers|=kilometres}}}}
    |sqmi= {{#ifeq:{{{1}}}|1|square mile|square miles}}
    }}}} ({{formatnum:{{ #expr: {{{1}}} * {{ #switch: {{{2|}}}
|acre = {{#switch: {{{3|}}}
    |ha=0.404685642
    |sqft=43560
    |sqm=4046.85642
    |sqkm=0.00404685642
    |sqmi=0.0015625
    }}
|ft = {{#switch: {{{3|}}}
    |m=0.3048
    |mi=0.000189393939
    |km=0.0003048
    }}
|sqft = {{#switch: {{{3|}}}
    |acre=0.0000229568411
    |ha=0.00009290304
    |sqm=0.09290304
    |sqkm=0.00000009290304
    |sqmi=0.0000000358700643
    }}
|ha = {{#switch: {{{3|}}}
    |acre=2.47105381
    |sqft=107639.104
    |sqm=10000
    |sqkm=0.01
    |sqmi=0.00386102159
    }}
|m  = {{#switch: {{{3|}}}
    |ft=3.2808399
    |km=1000
    |mi=1609.344}}
|sqm = {{#switch: {{{3|}}}
    |acre=0.000247105381
    |ha=0.0001
    |sqft=10.7639104
    }}
|km = {{#switch: {{{3|}}}
    |ft=3280.8399
    |m=1000
    |mi=0.621371192
    }}
|sqkm = {{#switch: {{{3|}}}
    |acre=247.105381
    |ha=100
    |sqft=10763910.4
    |sqm=1000000
    |sqmi=0.386102159
    }}
|mi = {{#switch: {{{3|}}}
    |ft=5280
    |m=1609.344
    |km=1.609344
    }}
|sqmi = {{#switch: {{{3|}}}
    |acre=640
    |ha=258.998811
    |sqft=27878400
    |sqm=2589988.11
    |sqkm=2.58998811
    }}
}} {{#if: {{{4|}}} | round {{{4}}} }}}}}}&nbsp;{{#switch: {{{lk|}}}|on=[[{{#switch: {{{3|}}}
    |acre= acre
    |ft=  foot (unit of length){{!}}ft
    |ha=  hectare{{!}}ha
    |sqft= square foot{{!}}ft²
    |m=    {{#switch: {{{sp|}}}|us=meter|=metre}}{{!}}m
    |km=  {{#switch: {{{sp|}}}|us=kilometer|=kilometre}}{{!}}km
    |mi=  mile{{!}}mi
    |sqm=  square {{#switch: {{{sp|}}}|us=meter|=metre}}{{!}}m²
    |sqkm= square {{#switch: {{{sp|}}}|us=kilometer|=kilometre}}{{!}}km²
    |sqmi= square mile{{!}}mi²
    }}]]|={{#switch: {{{3|}}}
    |acre= acre
    |ft=  ft
    |ha=  ha
    |sqft= ft²
    |m=    m
    |km=  km
    |mi=  mi
    |sqm=  m²
    |sqkm= km²
    |sqmi= mi²
    }}}})<noinclude>{{esoteric}}
;Two things to remember!
*[[Image:Flag of the United States.svg|20px]] '''U.S. USERS''': If you prefer '''meter''' over '''metre''' for your article, simply attatch <code><nowiki>|sp=us</nowiki></code> to the end of the template!
*To make the units [[Wikipedia:Manual of Style (links)|link]] to unit articles, add <code><nowiki>|lk=on</nowiki></code> to the end of the template!  The [[WP:MOS|manual of style]] suggests that you only link the first instance.<br/><br/>Use in the following matter: <code><nowiki>{{convert|original value|original unit|conversion unit|round to}}</nowiki></code><br/><br/>'''Rounding:''' The number given for rounding rounds off the result to the power of 1/10 the rounding number.  For instance, if the result is 8621 and the round number is '-2', the result will be 8700.  If the result is '234.0283043' and the round number is '0', the result will be 234.</noinclude>

Latest revision as of 01:02, 3 September 2020