Template:M to ft in: Difference between revisions

Boobpedia - Encyclopedia of big boobs
Jump to navigationJump to search
(New page: <noinclude> ;Usage: :<nowiki>{{m to ft in| num | abbr | spell | precision | wiki | frac}}</nowiki> ;Examples :''Manual of Style notation'': :*<nowiki>{{m to ft in|9}}</nowiki> →...)
 
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude></noinclude><includeonly>{{FORMATNUM:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}&nbsp;{{#ifexpr:({{#ifeq:{{LC:{{{abbr|mos}}}}}|mos|1|0}} OR {{#ifeq:{{LC:{{{abbr|mos}}}}}|no|1|0}})|{{#ifeq:{{LC:{{{spell|american}}}}}|american|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[metre|meters]]|meters}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[metre]]s|metres}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[metre|m]]|m}}}} ({{FORMATNUM:{{floor|{{#expr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.3048)}}}}&nbsp;{{#ifeq:{{LC:{{{abbr|mos}}}}}|no|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[foot (unit of length)|feet]]|feet}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[foot (unit of length)|ft]]|ft}}}} {{#ifexpr:{{{frac|10}}}=10|{{#expr:(({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.0254-12*{{floor|{{#expr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.3048}}}}) round {{{precision|1}}})}}|{{dec to frac|{{#expr:(({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.0254-12*{{floor|{{#expr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.3048}}}}) round {{{precision|1}}})}}|{{{frac}}}}}}}&nbsp;{{#ifeq:{{LC:{{{abbr|mos}}}}}|no|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[inch]]es|inches}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[inch|in]]|in}}}}}})</includeonly><noinclude>
;Usage:
:<nowiki>{{m to ft in| num | abbr | spell | precision | wiki | frac}}</nowiki>
 
;Examples
:''Manual of Style notation'':
:*<nowiki>{{m to ft in|9}}</nowiki>&nbsp;&rarr; {{m to ft in|9}}
:*<nowiki>{{m to ft in|9|frac=7}}</nowiki>&nbsp;&rarr; {{m to ft in|9|frac=7}}
:*<nowiki>{{m to ft in|9|frac=16}}</nowiki>&nbsp;&rarr; {{m to ft in|9|frac=16}}
:''Short notation'':
:*<nowiki>{{m to ft in|9|abbr=yes}}</nowiki>&nbsp;&rarr; {{m to ft in|9|abbr=yes}}
:*<nowiki>{{m to ft in|9|abbr=yes|frac=7}}</nowiki>&nbsp;&rarr; {{m to ft in|9|abbr=yes|frac=7}}
:*<nowiki>{{m to ft in|9|abbr=yes|frac=16}}</nowiki>&nbsp;&rarr; {{m to ft in|9|abbr=yes|frac=16}}
:''Full notation'':
:*<nowiki>{{m to ft in|num=9|abbr=no|spell=Commonwealth|precision=2|wiki=yes|frac=10}}</nowiki>&nbsp;&rarr; {{m to ft in|num=9|abbr=no|spell=Commonwealth|precision=2|wiki=yes|frac=10}}
:*<nowiki>{{m to ft in|num=9|abbr=no|spell=Commonwealth|precision=2|wiki=yes|frac=7}}</nowiki>&nbsp;&rarr; {{m to ft in|num=9|abbr=no|spell=Commonwealth|precision=2|wiki=yes|frac=7}}
:*<nowiki>{{m to ft in|num=9|abbr=no|spell=Commonwealth|precision=2|wiki=yes|frac=16}}</nowiki>&nbsp;&rarr; {{m to ft in|num=9|abbr=no|spell=Commonwealth|precision=2|wiki=yes|frac=16}}
''Italicized'' parameters are optional:
*'''num''' is a required parameter, which specifies the number of meters to be converted to feet and inches.  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 (meters, ft/in); ''yes'' will show the abbreviated names of the units (m, ft/in); and ''no'' will show the full names of the units (meters, feet/inches).  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''&mdash;"metres".  The default value is ''American''.
*'''''precision''''' is the number of decimal digits in the converted value.  The default value is&nbsp;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''.
*'''''frac''''' specifies whether the output of inches should be decimal or in vulgar fractions and can take integer values.  The value of ''10'' will lead to showing fractions of inches as decimals, while any other number will lead to showing fractions of inches as vulgar fractions (e.g., ''16'' will produce sixteenths).  Output vulgar fractions are resolved in lower terms whenever possible.
 
Capitalization of the parameters is unimportant.</noinclude><includeonly>{{FORMATNUM:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}}}&nbsp;{{#ifexpr:({{#ifeq:{{LC:{{{abbr|mos}}}}}|mos|1|0}} OR {{#ifeq:{{LC:{{{abbr|mos}}}}}|no|1|0}})|{{#ifeq:{{LC:{{{spell|american}}}}}|american|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[metre|meters]]|meters}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[metre]]s|metres}}}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[metre|m]]|m}}}} ({{FORMATNUM:{{floor|{{#expr:({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.3048)}}}}&nbsp;{{#ifeq:{{LC:{{{abbr|mos}}}}}|no|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[foot (unit of length)|feet]]|feet}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[foot (unit of length)|ft]]|ft}}}} {{#ifexpr:{{{frac|10}}}=10|{{#expr:(({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.0254-12*{{floor|{{#expr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.3048}}}}) round {{{precision|1}}})}}|{{dec to frac|{{#expr:(({{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.0254-12*{{floor|{{#expr:{{#if:{{{num|}}}|{{{num}}}|{{{1}}}}}/.3048}}}}) round {{{precision|1}}})}}|{{{frac}}}}}}}&nbsp;{{#ifeq:{{LC:{{{abbr|mos}}}}}|no|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[inch]]es|inches}}|{{#ifeq:{{LC:{{{wiki|no}}}}}|yes|[[inch|in]]|in}}}}}})</includeonly><noinclude>


</noinclude>
</noinclude>

Revision as of 17:32, 28 May 2008