Jump to content

Template:Lz12: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
m substing templates per RFD using AWB
No edit summary
 
Line 28: Line 28:
:{{evaldemo/3|lz|12|123}}
:{{evaldemo/3|lz|12|123}}


[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
[[Category:Mathematical templates|{{PAGENAME}}]]
[[Category:Mathematical templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 11:49, 11 March 2008

This auxiliary template adds leading zeros to a non-negative result of an expression for a total length of 12 digits (before the decimal point if any), it's used by template:Evalint (edittalklinkshistory), and it supports optional substitution.
{{Lz12|123}} gives 000000000123
{{Lz12|1234567}} gives 000001234567
{{Lz12|-.1}} gives value out of range:-0.1
{{Lz12|0.0}} gives 000000000000
{{Lz12|+.1}} gives 000000000000.1
{{Lz12|1234567890123}} gives value out of range:1234567890123
{{Lz12|123456789012.}} gives 123456789012
{{Lz12|1234567.90123}} gives 000001234567.90123
{{Lz12|12.4567890123}} gives 000000000012.4567890123

Compare Template:Lz:

{{lz|12|123}} gives 0000000000123