This wasn’t very straight forward to find, so I thought I would write something here. To get the day_of_week in Ruby/Rails, try this:
Essentially, we could probably wrap this…
class Date def day_of_week Date::DAYNAMES[self.wday] end end
And once included:
ruby-1.9.2-p136 :050 > Date.today.day_of_week => "Saturday"