User:Johan G/convert: Difference between revisions
Jump to navigation
Jump to search
(Expression syntax fix: mul → *) |
(take out round modifier... error said there was no operand for it...) |
||
Line 24: | Line 24: | ||
| mm = {{error|Conversion not implemented}} | | mm = {{error|Conversion not implemented}} | ||
| in = {{error|Conversion not implemented}} | | in = {{error|Conversion not implemented}} | ||
| m = {{#expr: {{{1}}} * 0.3048 | | m = {{#expr: {{{1}}} * 0.3048 {{{4|0}}}}} {{#if: {{{5|}}}||m}} | ||
| km = {{error|Conversion not implemented}} | | km = {{error|Conversion not implemented}} | ||
| mi = {{error|Conversion not implemented}} | | mi = {{error|Conversion not implemented}} | ||
| NM = {{#expr: {{{1}}} * 0.00016457883 | | NM = {{#expr: {{{1}}} * 0.00016457883 {{{4|0}}}}} {{#if: {{{5|}}}||NM}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
Line 53: | Line 53: | ||
| ft = {{error|Conversion not implemented}} | | ft = {{error|Conversion not implemented}} | ||
| m = {{error|Conversion not implemented}} | | m = {{error|Conversion not implemented}} | ||
| km = {{#expr: {{{1}}} * 1.60934 | | km = {{#expr: {{{1}}} * 1.60934 {{{4|0}}}}} {{#if: {{{5|}}}||km}} | ||
| NM = {{#expr: {{{1}}} * 0.868976 | | NM = {{#expr: {{{1}}} * 0.868976 {{{4|0}}}}} {{#if: {{{5|}}}||NM}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
Line 91: | Line 91: | ||
| m/s = {{error|Conversion not implemented}} | | m/s = {{error|Conversion not implemented}} | ||
| km/h = {{error|Conversion not implemented}} | | km/h = {{error|Conversion not implemented}} | ||
| kt = {{#expr: {{{1}}} * 0.869 | | kt = {{#expr: {{{1}}} * 0.869 {{{4|0}}}}} {{#if: {{{5|}}}||kt}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} | ||
Line 98: | Line 98: | ||
| m/s = {{error|Conversion not implemented}} | | m/s = {{error|Conversion not implemented}} | ||
| km/h = {{error|Conversion not implemented}} | | km/h = {{error|Conversion not implemented}} | ||
| mph = {{#expr: {{{1}}} * 1.152 | | mph = {{#expr: {{{1}}} * 1.152 {{{4|0}}}}} {{#if: {{{5|}}}||mph}} | ||
| #default = {{error|Parameter '''to-unit''' missing or not supported}} | | #default = {{error|Parameter '''to-unit''' missing or not supported}} | ||
}} | }} |
Revision as of 17:37, 5 August 2018
Parameter value missing
The following template description is not displayed when the template is inserted in an article.
Goal
This template can be used to...
Adding this template to a page will automatically add Category:... to that page.
Caution Caution that might help prevent lost work, very complicated debugging etc...
Note Note that might be helpful or lead the reader in the right direction.
Usage
{{convert|value|from-unit|to-unit|decimals|hide-unit}}
The parameters value, from-unit and to-unit are mandatory, and the other optional
- value
- Value to be converted from one unit to another.
- from-unit
- Unit to be converted from
- to-unit
- Unit to be converted to
- decimals
- Number of decimals. If empty, no decimals will be shown
- hide-unit
- If not empty the unit will not be shown in the result
Examples
Examples using different options.
Supported units
Conversion between some of these units have been implemented.
Units of length
mm | millimeter |
---|---|
in | inches |
ft | feet |
m | meters |
km | kilometers |
mi | statute miles |
NM | nautical miles |
Units of velocity
ft/s | feet per second |
---|---|
m/s | meters per second |
km/h | kilometers per hour |
mph | statute miles per hour |
kt | knots |
Units of time
s | seconds |
---|---|
min | minutes |
h | hours |
d | days |
Known issues
Known issues and workarounds if such are known.
Related templates
- {{example}}