Author: emddudley
Description:
I'd like to request a "magic word" similar to {{formatnum:}} that pads a number
with leading zeros.
Many images on Commons are uploaded as a series with leading zeros on the
image's index. For example, all of the images at
http://commons.wikimedia.org/wiki/User:BradPatrick/gallery have leading zeros.
Many cameras default to using leading zeros in their filenames. Automatically
generating these filenames in a template is difficult.
I don't want to encourage leading zeros in filenames, but if someone wants to
upload a large number of images, it's a huge pain to rename them all.
Examples:
- {{padzeros:2|4}} would render as 0002
- {{padzeros:02|4}} as 0002
- {{padzeros:0002|2}} as 02
- {{padzeros:1024|-1}} as 1024
- {{padzeros:1024|2}} as 1024
Version: unspecified
Severity: enhancement