Вікіфункції:Документація
Z21121K1
A string to represent a number. The number can be an integer, a decimal, or an (im)proper fraction. The value represents the quantity in the from unit. A "." acts as a decimal point, all commas are removed for processing.
Examples
- -1
- 5.289
- 5/4
Z21121K2 and Z21121K3
A string to represent a unit in a proprietary system. Units with exponents (like meters squared) can be represented by adding the exponent to the end of the unit expression. Division of units (like kilometers per hour) can be represented by adding a "/." Only one division is used per unit, everything to the right of the "/" is considered to be in the denominator. Multiplication is done by just putting units together. Z21121K2 represents the unit of Z21121K1, and Z21121K3 represents the unit of the conversion output. Both should be in the same dimension.
Examples
- "m2" -> meters squared
- "cm/s" -> centimeters per second
- "cWhm/b" -> centiwatt hour meters per bit
Z21121K4
An integer to represent rounding of the output number. 0 rounds to the whole number, positive numbers round to the number of decimal places, negative numbers round further than whole numbers.
Examples
- 0 -> nearest one
- 3 -> nearest thousandth
- 4 -> nearest ten thousand
Z21121K5-K7
Do not do anything yet, require greater Wikidata support.
Output
A string that includes both quantities and their units.
Examples
- 0 C (32 F)
- 10 km (10,000 m)
- 1 m2 (1,000,000 mm2)
Available units
- m/Meter*
- mi/Mile
- ft/Foot
- yd/Yard
- in/Inch
- NM/Nautical Mile
- au/Astronomical Unit
- ly/Light Year
- Å/Angstrom
- fur/Furlong
- ftm/Fathom
- cb/Cable
- ch/Chain
- rd/Rod
- li/Link
- s/Second*
- min/Minute
- h/Hour
- d/Day
- wk/Week
- mo/Month
- y/Year
- g/Gram*
- lb/Pound
- oz/Ounce
- b/Bit**
- B/Byte**
- Pa/Pascal*
- bar/Bar*
- atm/Standard Atmosphere
- mHg/Meter of Mercury*
- psi/Pound per Square Inch
- J/Joule*
- cal/Thermochemical Calorie
- eV/Electronvolt
- BTU/British Thermal Unit
- Wh/Watt-Hour*
- K/Kelvin***
- C/Celsius***
- F/Fahrenheit***
*Supports metric prefixes **Supports metric prefixes, base 10 instead of standard 2 ***Handled separately