Hi All, Checked the API and archives, but can't seem to find anything. Before I roll my own I thought I would ask if this exists... I have a field in the DB that stores a month as a number from 1 to 12. I would like to convert that for use in a view as the word for the month. So 1 => January, 2=> February, and so on. Is there a function for this, or am I on my own? Thanks!
on 2007-03-30 05:04
on 2007-03-30 05:08
http://corelib.rubyonrails.org/classes/Date.html Date::MONTHNAMES firstname.lastname@example.org wrote: > > Is there a function for this, or am I on my own? > > Thanks! > > > > > > -- View this message in context: http://www.nabble.com/Convert-Number-%281-12%29-in... Sent from the RubyOnRails Users mailing list archive at Nabble.com.
on 2007-03-30 15:41
>> month = 1 >> Date::MONTHNAMES[month] => 'January' -christos On Mar 30, 5:03 am, "andrew.ohns...@gmail.com"