Template:Convert/to/AonSon

{{ #ifeq: { | {{padleft:|1|{{{u|{}}}x}} |-   |{{#ifexpr: {{str_len|{{{2|4+6}}}|}} < 7| |&#32;}} }}{{ #ifeq: { |{{padleft:|1|{{{u|{}}} }}|{{{h|{{{n}}}}}} |{{{u}}} }} {{documentation|content= The Template:Convert/to/AonSon formats a range where the 2 amounts are separated with word "-to-" between the numbers. The range can text-wrap before the unit if the 2nd amount > 6 long, such as a number in scientific x10 notation.

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.

}}