From: "David A. Black" Date: 2005-05-15T19:32:47+09:00 Subject: Re: Formatting date without leading zeros Hi -- On Sun, 15 May 2005, Tom Reinhart wrote: > I've tried to do the best research I can into this before posting here, > but I have come up relatively short. I would like to format a DateTime > such that the day of the month and hours that are less than ten are not > prefixed with a leading zero (ex. Jan 4 9:30 and not Jan 04 09:30). > > Is there any way to use DateTime#strftime to do this, or any > alternative short of piecing the bits together with calls like > thedate.month + " " + thedate.day? I think the %e and %l modifiers will give you the day of month and the hour without 0's, but with spaces (i.e., space-padded). Looking at date/format.rb I don't see a way to suppress the padding. David -- David A. Black dblack@wobblini.net