Template:Convert/to(-)

From MattWiki
Jump to: navigation, search

{{convert/{{{4}}}|{{{1}}}|to(-)|{{{3}}}|{{{5}}}|s=(0.5)+(0{{{s}}})|r={{{r}}}|d=Dual/{{{d}}}}}

Documentation icon Template documentation

The Template:Convert/to(-) formats a 2-number range with the word "to" between numbers when showing a unit name, but with a dash "–" when showing a unit symbol. Examples:

  • {{convert|103|to(-)|105|km|mi}} → 103 to 105 kilometres (64–65 mi)
  • {{convert|103|to(-)|105|F|C}} → 103 to 105 °F (39–41 °C)
  • {{convert|-10|to|-15|F|C}}      → −10 to −15 °F (−23 to −26 °C)
  • {{convert|85|to(-)|95|K}}        → 85 to 95 K (−188.2 – −178.2 °C; −306.7 – −288.7 °F)

See also