Template:Convert/to(-)/AonSoff: Difference between revisions

From Orain Meta
Jump to navigation Jump to search
imported>Wikid77
(fixed to handle undefined {{{u}}} as literal "{{{u}}}" by check for leading curly brace "{".)
 
m (1 revision)
 
(No difference)

Latest revision as of 12:00, 4 November 2013

{{{1}}}–{{{2}}} {{{u}}}

The Template:Convert/to(-)/AonSoff formats a range where the 2 amounts are separated by "to" when non-abbreviated, but by "–" when showing the unit symbols. If the 2nd amount is negative, then the dash will be surrounded by spaces to separate from the &minus sign.

For unit-codes where the unit symbol is undefined (or blank), then the template also checks for literal "{{{u}}}" with leading curly brace "{" and then the unit name (depending on amount singular or plural) will be displayed instead.