13,208
edits
(Created page with "{{#if: <!-- Is the value parameter missing? --> {{{value|}}} | <!-- No, the value parameter is not missing -->{{#switch: {{{from-unit|}}} | mm = {{#switch: {{{to-u...") |
(Fix: Used named template parameters in the template instead of unnamed/numbered parameters. Hence absolutely nothing worked as per documentation) |
||
Line 1: | Line 1: | ||
{{#if: <!-- Is the value parameter missing? --> | {{#if: <!-- Is the value parameter missing? --> | ||
{{{ | {{{1|}}} | ||
| <!-- No, the value parameter is not missing | | <!-- No, the value parameter is not missing | ||
-->{{#switch: {{{ | -->{{#switch: {{{2|}}} | ||
| mm = {{#switch: {{{ | | mm = {{#switch: {{{3|}}} | ||
| in = {{#expr: {{{value|309}}} div 25.4 round {{{ | | in = {{#expr: {{{value|309}}} div 25.4 round {{{4|0}}}}} {{#if: {{{5|}}}||in}} | ||
| ft = {{#expr: {{{ | | ft = {{#expr: {{{1}}} div 304.8 round {{{4|0}}}}} {{#if: {{{5|}}}||ft}} | ||
| m = {{#expr: {{{ | | m = {{#expr: {{{1}}} div 1000 round {{{4|0}}}}} {{#if: {{{5|}}}||m}} | ||
| km = {{#expr: {{{ | | km = {{#expr: {{{1}}} div 1000000 round {{{4|0}}}}} {{#if: {{{5|}}}||km}} | ||
| mi = {{#expr: {{{ | | mi = {{#expr: {{{1}}} div 1609300 round {{{4|0}}}}} {{#if: {{{5|}}}||mi}} | ||
| NM = {{#expr: {{{ | | NM = {{#expr: {{{1}}} div 1852000 round {{{4|0}}}}} {{#if: {{{5|}}}||NM}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| in = {{#switch: {{{ | | in = {{#switch: {{{3|}}} | ||
| mm = {{error|Conversion not implemented}} | | mm = {{error|Conversion not implemented}} | ||
| ft = {{error|Conversion not implemented}} | | ft = {{error|Conversion not implemented}} | ||
Line 21: | Line 21: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| ft = {{#switch: {{{ | | ft = {{#switch: {{{3|}}} | ||
| mm = {{error|Conversion not implemented}} | | mm = {{error|Conversion not implemented}} | ||
| in = {{error|Conversion not implemented}} | | in = {{error|Conversion not implemented}} | ||
Line 30: | Line 30: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| m = {{#switch: {{{ | | m = {{#switch: {{{3|}}} | ||
| mm = {{#expr: {{{ | | mm = {{#expr: {{{1}}} div 0.001 round {{{4|0}}}}} {{#if: {{{5|}}}||mm}} | ||
| in = {{#expr: {{{ | | in = {{#expr: {{{1}}} div 0.0254 round {{{4|0}}}}} {{#if: {{{5|}}}||in}} | ||
| ft = {{#expr: {{{ | | ft = {{#expr: {{{1}}} div 0.3048 round {{{4|0}}}}} {{#if: {{{5|}}}||ft}} | ||
| km = {{#expr: {{{ | | km = {{#expr: {{{1}}} div 1000 round {{{4|0}}}}} {{#if: {{{5|}}}||km}} | ||
| mi = {{#expr: {{{ | | mi = {{#expr: {{{1}}} div 1609.3 round {{{4|0}}}}} {{#if: {{{5|}}}||mi}} | ||
| NM = {{#expr: {{{ | | NM = {{#expr: {{{1}}} div 1852 round {{{4|0}}}}} {{#if: {{{5|}}}||NM}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| km = {{#switch: {{{ | | km = {{#switch: {{{3|}}} | ||
| mm = {{#expr: {{{ | | mm = {{#expr: {{{1}}} div 0.000001 round {{{4|0}}}}} {{#if: {{{5|}}}||mm}} | ||
| in = {{#expr: {{{ | | in = {{#expr: {{{1}}} div 0.0000254 round {{{4|0}}}}} {{#if: {{{5|}}}||in}} | ||
| ft = {{#expr: {{{ | | ft = {{#expr: {{{1}}} div 0.0003048 round {{{4|0}}}}} {{#if: {{{5|}}}||ft}} | ||
| m = {{#expr: {{{ | | m = {{#expr: {{{1}}} div 1 round {{{4|0}}}}} {{#if: {{{5|}}}||m}} | ||
| mi = {{#expr: {{{ | | mi = {{#expr: {{{1}}} div 1.6093 round {{{4|0}}}}} {{#if: {{{5|}}}||mi}} | ||
| NM = {{#expr: {{{ | | NM = {{#expr: {{{1}}} div 1.852 round {{{4|0}}}}} {{#if: {{{5|}}}||NM}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| mi = {{#switch: {{{ | | mi = {{#switch: {{{3|}}} | ||
| mm = {{error|Conversion not implemented}} | | mm = {{error|Conversion not implemented}} | ||
| in = {{error|Conversion not implemented}} | | in = {{error|Conversion not implemented}} | ||
Line 57: | Line 57: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| NM = {{#switch: {{{ | | NM = {{#switch: {{{3|}}} | ||
| mm = {{error|Conversion not implemented}} | | mm = {{error|Conversion not implemented}} | ||
| in = {{error|Conversion not implemented}} | | in = {{error|Conversion not implemented}} | ||
Line 66: | Line 66: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| ft/s = {{#switch: {{{ | | ft/s = {{#switch: {{{3|}}} | ||
| m/s = {{error|Conversion not implemented}} | | m/s = {{error|Conversion not implemented}} | ||
| km/h = {{error|Conversion not implemented}} | | km/h = {{error|Conversion not implemented}} | ||
Line 73: | Line 73: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| m/s = {{#switch: {{{ | | m/s = {{#switch: {{{3|}}} | ||
| ft/s = {{error|Conversion not implemented}} | | ft/s = {{error|Conversion not implemented}} | ||
| km/h = {{error|Conversion not implemented}} | | km/h = {{error|Conversion not implemented}} | ||
Line 80: | Line 80: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| km/h = {{#switch: {{{ | | km/h = {{#switch: {{{3|}}} | ||
| ft/s = {{error|Conversion not implemented}} | | ft/s = {{error|Conversion not implemented}} | ||
| m/s = {{error|Conversion not implemented}} | | m/s = {{error|Conversion not implemented}} | ||
Line 87: | Line 87: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| mph = {{#switch: {{{ | | mph = {{#switch: {{{3|}}} | ||
| ft/s = {{error|Conversion not implemented}} | | ft/s = {{error|Conversion not implemented}} | ||
| m/s = {{error|Conversion not implemented}} | | m/s = {{error|Conversion not implemented}} | ||
Line 94: | Line 94: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| kt = {{#switch: {{{ | | kt = {{#switch: {{{3|}}} | ||
| ft/s = {{error|Conversion not implemented}} | | ft/s = {{error|Conversion not implemented}} | ||
| m/s = {{error|Conversion not implemented}} | | m/s = {{error|Conversion not implemented}} | ||
Line 101: | Line 101: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| s = {{#switch: {{{ | | s = {{#switch: {{{3|}}} | ||
| min = {{#expr: {{{ | | min = {{#expr: {{{1}}} div 60 round {{{4|0}}}}} {{#if: {{{5|}}}||min}} | ||
| h = {{#expr: {{{ | | h = {{#expr: {{{1}}} div 3600 round {{{4|0}}}}} {{#if: {{{5|}}}||h}} | ||
| d = {{#expr: {{{ | | d = {{#expr: {{{1}}} div 86400 round {{{4|0}}}}} {{#if: {{{5|}}}||d}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| min = {{#switch: {{{ | | min = {{#switch: {{{3|}}} | ||
| s = {{error|Conversion not implemented}} | | s = {{error|Conversion not implemented}} | ||
| h = {{error|Conversion not implemented}} | | h = {{error|Conversion not implemented}} | ||
Line 113: | Line 113: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| h = {{#switch: {{{ | | h = {{#switch: {{{3|}}} | ||
| s = {{error|Conversion not implemented}} | | s = {{error|Conversion not implemented}} | ||
| min = {{error|Conversion not implemented}} | | min = {{error|Conversion not implemented}} | ||
Line 119: | Line 119: | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
| d = {{#switch: {{{ | | d = {{#switch: {{{3|}}} | ||
| s = {{error|Conversion not implemented}} | | s = {{error|Conversion not implemented}} | ||
| min = {{error|Conversion not implemented}} | | min = {{error|Conversion not implemented}} |