Difference between revisions of "Template:Ft in to m"

From Teampedia
Jump to: navigation, search
(Created page with "{{convert/{{#ifeq:{{{4}}}|in|and/in|{{{d}}}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|s={{{s|}}}|r={{{r}}}|d={{{d}}}|u=ft")
 
m (Zacharycook505-104668625857976836193 moved page Template:Convert/ft to Template:Ft in to m)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{convert/{{#ifeq:{{{4}}}|in|and/in|{{{d}}}}}|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|s={{{s|}}}|r={{{r}}}|d={{{d}}}|u=ft
+
<includeonly>{{FORMATNUM:{{{ft|{{{1|0}}}}}}}}&nbsp;{{#ifexpr:({{#ifeq:{{LC:{{{abbr|mos}}}}}|mos|1|0}} OR {{#ifeq:{{LC:{{{abbr|mos}}}}}|no|1|0}})|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|{{#ifeq:{{{ft|{{{1|0}}}}}}|1|[[foot (unit of measurement)|foot]]|[[foot (unit of measurement)|feet]]}}|{{#ifeq:{{{ft|{{{1|0}}}}}}|1|foot|feet}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[foot (unit of measurement)|ft]]|ft}}}}&nbsp;{{FORMATNUM:{{{in|{{{2|0}}}}}}}}&nbsp;{{#ifexpr:({{#ifeq:{{LC:{{{abbr|mos}}}}}|mos|1|0}} OR {{#ifeq:{{LC:{{{abbr|mos}}}}}|no|1|0}})|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|{{#ifeq:{{{in|{{{2|0}}}}}}|1|[[inch]]|[[inch]]es}}|{{#ifeq:{{{in|{{{2|0}}}}}}|1|inch|inches}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[inch|in]]|in}}}} ({{FORMATNUM:{{rnd|{{#expr:(12*{{{ft|{{{1|0}}}}}}+{{{in|{{{2|0}}}}}})*0.0254}}|{{{precision|1}}}}}}}&nbsp;{{#ifeq:{{LC:{{{abbr|mos}}}}}|no|{{#ifeq:{{LC:{{{spell|american}}}}}|commonwealth|{{#ifeq:{{LC:{{{wiki|no}}}}}|no|metre{{#ifeq:{{rnd|{{#expr:(12*{{{ft|{{{1|0}}}}}}+{{{in|{{{2|0}}}}}})*0.0254}}|{{{precision|1}}}}}|1||s}}|[[metre]]{{#ifeq:{{rnd|{{#expr:(12*{{{ft|{{{1|0}}}}}}+{{{in|{{{2|0}}}}}})*0.0254}}|{{{precision|1}}}}}|1||s}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|no|meter{{#ifeq:{{rnd|{{#expr:(12*{{{ft|{{{1|0}}}}}}+{{{in|{{{2|0}}}}}})*0.0254}}|{{{precision|1}}}}}|1||s}}|[[metre|meter{{#ifeq:{{rnd|{{#expr:(12*{{{ft|{{{1|0}}}}}}+{{{in|{{{2|0}}}}}})*0.0254}}|{{{precision|1}}}}}|1||s}}]]}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|no|m|[[metre|m]]}}}})</includeonly><noinclude>
 +
{{pp-template|small=yes}}
 +
{{Documentation}}
 +
</noinclude>

Latest revision as of 14:05, 11 April 2020

Template:Pp-template

[view] [edit] [history] [purge] Documentation icon Template documentation
Usage
{{ft in to m | ft | in | abbr | spell | precision | wiki}}
Examples
Manual of Style notation: {{ft in to m|30|1}} → 30 feet 1 inch (Template:Rnd/b1 m)
Short notation: {{ft in to m|30|1|abbr=yes}} → 30 ft 1 in (Template:Rnd/b1 m)
Full notation: {{ft in to m|ft=30|in=1|abbr=no|spell=Commonwealth|precision=2|wiki=yes}} → 30 feet 1 inch (Template:Rnd/b1 metres)

Italicized parameters are optional:

  • ft, when not explicitly specified, is the first unnamed parameter of the template. To convert values such as "0 ft 10 in", set ft=0 ({{ft in to m|0|10...}}). Please do not format this parameter; i.e., use 1234 instead of 1,234.
  • in, when not explicitly specified, is the second unnamed parameter of the template. To convert values such as "10 ft 0 in", either set in=0 ({{ft in to m|10|0...}}), or omit this parameter (<nowiki>{{ft in to m|10...}}), or use {{ft to m}} instead of this template.
  • 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 (x feet y inches, m); yes will show the abbreviated names of the units (x ft y in, m); and no will show the full names of the units (x feet y inches, meters). 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 "meters", and Commonwealth—"metres". The default value is American.
  • precision is the number of decimal digits in the converted value. The default value is 1.
  • 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

The above documentation is transcluded from Template:Ft in to m/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.