Formatting dates in Ruby
I'm reading http://www.ruby-doc.org/core/classes/Date.html and trying to figure out how to get what I want out of a Date object.
I want to be able to take the date, give it a format string, and have it return a string with the date formatted properly.
I think you want the Time object, specifically its strftime() method.
Well the database column is type date, and so I believe Rails turns that into a Date object automatically.
I see a list of constants, like MONTHNAMES, at the link above... how do I access those? The Agile book shows a way to format dates using arrays like that, but I'd rather not re-create the arrays in my own code if they're already in the Date class.