[REBOL] Integer formatting
From: swhite:ci:bloomington:mn:us at: 10-Feb-2006 11:14
Wow! Those demos! I didn't quite realize that REBOL could do that. I am mentally stuck
in the days of mainframe programming when processors were slow, memory was small, and
interpreters were slow.
But back to Dullsville, can anyone tell me how to do this?
I want to assemble the year, month, and day into a string (YYYYMMDD) to use in a file
name. The following line almost does it:
print join to-string now/year [to-string now/month to-string now/day]
BUT, if the month or day is a single digit, I don't know how to pad it out with a leading
zero. For example, February 10, 2006 comes out as 2006210 when I want 20060210.
Thank you for any help.
City of Bloomington
1800 W Old Shakopee Rd
Bloomington MN 55431-3096