Jump to content

Template:Height/sandbox: Difference between revisions

From Wikipedia!
Content deleted Content added
Use convert directly now that it supports frac
temporarily saving old version for regression tests
Line 1: Line 1:
{{#switch:{{#if:{{{centimeter|{{{centimeters|{{{centimetre|{{{centimetres|{{{cm|}}}}}}}}}}}}}}}|1|0}}{{#if:{{{meter|{{{meters|{{{metre|{{{metres|{{{m|}}}}}}}}}}}}}}}|1|0}}{{#if:{{{foot|{{{feet|{{{ft|}}}}}}}}}|1|0}}{{#if:{{{inch|{{{inches|{{{in|}}}}}}}}}|1|0}}
{{#switch:{{#if:{{{meter|{{{meters|{{{metre|{{{metres|{{{m|{{{centimeter|{{{centimeters|{{{centimetre|{{{centimetres|{{{cm|}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}|1|0}}{{#if:{{{foot|{{{feet|{{{ft|}}}}}}}}}|1|0}}{{#if:{{{inch|{{{inches|{{{in|}}}}}}}}}|1|0}}
|1000={{convert|{{{centimeter|{{{centimeters|{{{centimetre|{{{centimetres|{{{cm|}}}}}}}}}}}}}}}|cm|ftin|frac={{#ifeq:{{{precision}}}|0|1|{{{frac|2}}}}}|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{{precision|1}}} }}
|100={{height/m to ft in|frac={{#ifeq:{{{precision}}}|0|1|{{{frac|2}}}}}|abbr={{{abbr|yes}}}|wiki={{{wiki|no}}}|precision={{{precision|1}}}|{{{meter|{{{meters|{{{metre|{{{metres|{{{m|{{#expr:({{{centimeter|{{{centimeters|{{{centimetre|{{{centimetres|{{{cm|0}}}}}}}}}}}}}}}/100)}}}}}}}}}}}}}}}}} }}
|0100={{convert|{{{meter|{{{meters|{{{metre|{{{metres|{{{m}}}}}}}}}}}}}}}|m|ftin|frac={{#ifeq:{{{precision}}}|0|1|{{{frac|2}}}}}|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{{precision|1}}} }}
|011={{convert|{{{foot|{{{feet|{{{ft|}}}}}}}}}|ft|{{{inch|{{{inches|{{{in|}}}}}}}}}|in|m|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{#if:{{{precision|}}}|{{{precision}}}|2}} }}
|0011={{convert|{{{foot|{{{feet|{{{ft|}}}}}}}}}|ft|{{{inch|{{{inches|{{{in|}}}}}}}}}|in|m|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{#if:{{{precision|}}}|{{{precision}}}|2}} }}
|010={{convert|{{{foot|{{{feet|{{{ft|}}}}}}}}}|ft|0|in|m|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{#if:{{{precision|}}}|{{{precision}}}|2}} }}
|0010={{convert|{{{foot|{{{feet|{{{ft|}}}}}}}}}|ft|0|in|m|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{#if:{{{precision|}}}|{{{precision}}}|2}} }}
|001={{convert|0|ft|{{{inch|{{{inches|{{{in|}}}}}}}}}|in|m|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{#if:{{{precision|}}}|{{{precision}}}|2}} }}
|111|110|101={{Error|Error: please specify height using only [[Metric system|metric]] or [[Imperial units|imperial]] units.}}
|0001={{convert|0|ft|{{{inch|{{{inches|{{{in|}}}}}}}}}|in|m|abbr={{#switch:{{{abbr}}}|no=off|mos=def|#default=on}}|lk={{#ifeq:{{{wiki|}}}|yes|on|off}}|{{#if:{{{precision|}}}|{{{precision}}}|2}} }}
|#default=
|0000=
|#default={{Error|Error: please specify height using only one type of units}}
}}<noinclude>
}}<noinclude>
{{Documentation}}
{{template sandbox notice}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Revision as of 17:21, 13 March 2014