From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
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