Template:Convert/-/AonSoff: Difference between revisions

From altgothic
Jump to navigation Jump to search
m 1 revision
 
(No difference)

Latest revision as of 20:16, 24 June 2012

{{#ifexpr: abs( 90 ) >= abs( 9 )|{{{1}}}|{{#if:{{#titleparts:1+4/5|1|2}} |Template:Convert/numdisp/frac|{{#ifexpr:1+4/5 < 0

 |−{{#expr:−1+4/5 }}{{
    #ifexpr:1+4/50=1+4/5
    and 1+4/5=floor( 1+4/5 )|.}}|1+4/5}}}}}}{{
 #ifexpr:4 < 0
   | – |–}}{{#ifexpr: abs( 40 ) >= abs( 4 )|{{{2}}}|{{#if:{{#titleparts:3+6/7|1|2}}

|Template:Convert/numdisp/frac|{{#ifexpr:3+6/7 < 0

 |−{{#expr:−3+6/7 }}{{
    #ifexpr:3+6/70=3+6/7
    and 3+6/7=floor( 3+6/7 )|.}}|3+6/7}}}}}} {{#ifexpr:( 3/4 ) < 1.0001 and ( 3/4 ) > 0|{{
 #if:x|{{{u}}}|{{{n}}} }}|{{
 #if:|{{{u}}}|{{{n}}}s }}}}


The Template:Convert/-/AonSoff displays a range of numbers with en-dash "–" and the unit symbol abbreviation (if any), else it displays the unit name, as singular or plural for the 2nd amount. An example of a unit which has no unit symbol is the unit acre, which always shows either "acre" or "acres". This template is used to show either the input range numbers or the output range numbers, which might contain commas or x10 notation.