Does Ruby\'s strftime
have a format for the month without a leading zero?
I found %e
for getting the day without the leading zero, but not hav
Some versions of strftime
do allow prefixing with minus to format out leading zeros, for eg:
strftime "%-d/%-m/%y"
However this will depend on strftime
on your system. So for consistency I would do something like this instead:
dt = Time.local(2010, 'Sep', 1)
printf "%d/%d/%d", dt.day, dt.month, dt.year