Template:NumberFormatPad: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 1: Line 1:
<onlyinclude>{{#if:{{{pad|}}}|{{#vardefine:_numlen|{{#invoke:String|len|{{#number_format:{{{1}}}|0|||{{{5|}}}}}}}}}{{#loop:_i|{{{pad}}}|{{#expr:{{#var:_numlen}}-{{{pad}}}}}|0{{#ifexpr:{{#var:_i}}mod3=1|{{#switch:{{{4}}}|n=&nbsp;|t=&thinsp;|{{{4|,}}}}}}}}}}}{{#number_format:{{{1}}}|{{{2|0}}}|{{{3|.}}}|{{{4|,}}}|{{{5|}}}}}</onlyinclude>
<onlyinclude>{{#vardefine:_numlen|{{#invoke:String|len|{{#number_format:{{{1}}}|0|||{{{5|}}}}}}}}}{{#ifexpr:{{{pad|0}}}>{{#var:_numlen}}|{{#loop:_i|{{{pad}}}|{{#expr:{{#var:_numlen}}-{{{pad}}}}}|0{{#ifexpr:{{#var:_i}}mod3=1|{{#switch:{{{4}}}|n=&nbsp;|t=&thinsp;|{{{4|,}}}}}}}}}}}{{#number_format:{{{1}}}|{{{2|0}}}|{{{3|.}}}|{{{4|,}}}|{{{5|}}}}}</onlyinclude>


* {{NumberFormatPad|0|pad=1}}
* {{NumberFormatPad|0|pad=1}}
Line 6: Line 6:
* {{NumberFormatPad|1|pad=2}}
* {{NumberFormatPad|1|pad=2}}
* {{NumberFormatPad|12|pad=2}}
* {{NumberFormatPad|12|pad=2}}
* {{NumberFormatPad|123456|pad=2}}
* {{NumberFormatPad|0|pad=3}}
* {{NumberFormatPad|0|pad=3}}
* {{NumberFormatPad|1|pad=3}}
* {{NumberFormatPad|1|pad=3}}
37

edits

Navigation menu