views:

75

answers:

3

First of all, it doesn't seem that the DateTime format variables are documented anywhere so a +1 to anyone who can show this to me in rubydocs. Second of all, when looking at the Date.strftime function code, I don't see anything that can let me do something like:

Thursday, September 9th 2010

Does anyone know if this is possible?

+1  A: 

http://ruby-doc.org/core/classes/Time.html#M000298 +1 please :)

Matt Briggs
-1 That's `Time`, not `DateTime`. I jest, of course, basically the strftime options are the same for `DateTime` and `Time`. (The down vote wasn't me!)
Shadwell
No worries :) I gave up trying to understand the motivations of up and down voters here ages ago
Matt Briggs
I gave a +1 but it would be great if you could edit your answer by adding the Date formats. I can't seem to find those.
DJTripleThreat
+1  A: 

You can found all means %xx in Time documentation

http://ruby-doc.org/core/classes/Time.html#M000298

So you just need made

date.strftime('%A, %B %d %Y')
shingara
+4  A: 

You might want to take a look here.

To summarize

time = DateTime.now
time.strftime("%A, %B #{time.day.ordinalize} %Y")
aNoble
awesome! Thanks :)
DJTripleThreat