Template:Val/delimitnum: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Jimp use Module:Gapnum |
meta>Jimp handling of ".1" etc. |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch:{{{fmt}}} | <includeonly>{{#switch:{{#invoke:String|sub|{{{1|0}}}|1|1}} | ||
|-|−={{#ifeq:{{{nosign|off}}}|off | |||
|− | |||
|{{formatnum:{{#invoke:String| | }}{{#ifeq:{{#invoke:String|sub|{{{1|0}}}|2|2}}|. | ||
|0 | |||
}}{{#switch:{{{fmt}}} | |||
|commas4={{#ifexpr:{{#invoke:String|sub|{{{1|0}}}|2}}<1E4 | |||
|{{#invoke:String|sub|{{{1|0}}}|2}} | |||
|{{formatnum:{{#invoke:String|sub|{{{1|0}}}|2}}}} | |||
}} | |||
|commas={{formatnum:{{#invoke:String|sub|{{{1|0}}}|2}}}} | |||
|{{#invoke:Gapnum|main|{{#invoke:String|sub|{{{1|0}}}|2}}}} | |||
}} | }} | ||
| | |+={{#ifeq:{{{nosign|off}}}|off | ||
|{{#switch:{{{ | |+ | ||
}}{{#ifeq:{{#invoke:String|sub|{{{1|0}}}|2|2}}|. | |||
|{{formatnum:{{#invoke:String| | |0 | ||
}}{{#switch:{{{fmt}}} | |||
|commas4={{#ifexpr:{{{1|0}}}<1E4 | |||
|{{#invoke:String|sub|{{{1|0}}}|2}} | |||
|{{formatnum:{{#invoke:String|sub|{{{1|0}}}|2}}}} | |||
}} | }} | ||
|{{formatnum:{{{1|0}}}}} | |commas={{formatnum:{{#invoke:String|sub|{{{1|0}}}|2}}}} | ||
|{{#invoke:Gapnum|main|{{#invoke:String|sub|{{{1|0}}}|2}}}} | |||
}} | |||
|.=0{{#switch:{{{fmt}}} | |||
|commas4 | |||
|commas={{{1|0}}} | |||
|{{#invoke:Gapnum|main|{{{1|0}}}}} | |||
}} | }} | ||
|{{#ifexpr:{{{1|0}}}<1E4 | |{{#switch:{{{fmt}}} | ||
|{{#switch:{{{u}}} | |commas4={{#ifexpr:abs{{{1|0}}}<1E4 | ||
|{{{1|0}}} | |||
|{{ | |{{formatnum:{{{1|0}}}}} | ||
}} | |||
|commas={{#ifexpr:{{{1|0}}}<1E4 | |||
|{{#switch:{{{u}}} | |||
|BC|AD|BCE|CE={{{1|0}}} | |||
|{{formatnum:{{{1|0}}}}} | |||
}} | |||
|{{formatnum:{{{1|0}}}}} | |||
}} | |||
|{{#ifexpr:{{{1|0}}}<1E4 | |||
|{{#switch:{{{u}}} | |||
|BC|AD|BCE|CE={{{1|0}}} | |||
|{{#invoke:Gapnum|main|{{{1|0}}}}} | |{{#invoke:Gapnum|main|{{{1|0}}}}} | ||
}} | }} | ||
|{{#invoke:Gapnum|main|{{{1|0}}}}} | |||
}} | }} | ||
}} | }} | ||
}}</includeonly><noinclude>{{documentation}}</noinclude> | }}</includeonly><noinclude>{{documentation}}</noinclude> |