Template:Convert/2
10×20 metres (33×66 ft)
[edit]
DocumentationThe converter Template:Convert/2 will convert 2 amounts at once, allowing any range words/text between the 2 amounts. However, both amounts are treated as the same unit type. The output unit must be specified, or put "0" for the default output unit.
- Usage: {{convert/2 |5|by|6|m|ft}}
- {{convert/2 |5|x|6|m|ft}}
- {{convert/2 |5.5|up to|6|m|ft}}
- {{convert/2 |15|rarely|20|km|mi|abbr=on}}
The template has the same parameters as Template:Convert, and so it allows abbreviation abbr=in or abbr=out or abbr=none, wikilinks lk=on, lk=in or lk=out, and adjective mode adj=on. The separator can also be a semicolon: disp=semi, disp=or, disp=comma, disp=x & disp=b (default parentheses). Using optional parameter "warn=yes" will warn when the separator is an unusual word (other than: to, by, and, or, -, +/-, x, xx or comma).
- Examples
The following examples show various separator text, with p=2 to round the precision to 2 decimal places:
- {{convert/2 |5|by|6|m|ft}} → 5 by 6 metres (16 by 20 ft)
- {{convert/2 |5|by|6|m|ft|lk=on}} → 5 by 6 metres (16 by 20 ft)
- {{convert/2 |5|x|6|m|ft|p=2}} → 5×6 metres (16.40×19.69 ft)
- {{convert/2 |7550|rarely|7600|km|mi}} → 7,550 rarely 7,600 kilometres (4,690 rarely 4,700 mi)
- {{convert/2 |7|to|8|km|mi|abbr=on}} → 7 to 8 km (4.3 to 5.0 mi)
- {{convert/2 |7|to|8|km|mi|adj=on}} → 7-to-8-kilometre (4.3-to-{{convert/round|8|( 8 )*1000/1609.344|||3.206648885-3-0-mile)
- {{convert/2 |10|-|20|°C|F|disp=or}} → 10–20 °C or 50–68 °F
- {{convert/2 |11|-|22|°C|F|disp=semi}} → 11–22 °C; 52–72 °F
- {{convert/2 |40|-|50|°F|C|lk=on }} → 40–50 °F (4–10 °C)
- {{convert/2 |45|-|55|°F|C|disp=x| in winter (|)}} → 45–55 °F<b/> in winter (7–13 °C)
- {{convert/2 |5+1/2|by|6|m|ft}} → 5 by 6 metres (18 by 20 ft) 1⁄2
- {{convert/2 |5+1/2|by|6|m|ft|abbr=in}} → 5 by 6 m (18 by 20 ft) 1⁄2
Common range-words are: to, by, and, or, -, +/-, ~, x, xx & comma, but any text can be inserted. Display types: disp=comma, disp=semi, disp=or, disp=s, disp=2 (or disp=out), disp=# (or disp=number), disp=x and disp=b. The results are identical to using Template:Convert for each amount individually.
See also
- Template:Convert/3 - to convert 3 amounts of the same unit
- Template:Convert/4 - to convert 4 amounts of the same unit