I'm completing an example involving a clock, so I'm working with integers between 0 and 60 in some cases, and 0 and 12 in others. I need the length of each number to be two digits long, even when the value is less than 10.
For example
0 => 00
2 => 02
10 => 10
etc
I want to have them formatted, but not necessarily to print them out. What's the easiest way to achieve this?