You can get the name of the day as follows:
Time.now.strftime("%B %d, %Y %a")
Time.now.strftime("%B %d, %Y %A")
You can also get day names from a number 0...7using Date::DAYNAMESas follows:
require 'date'
(0...7).each { |x| puts Date::DAYNAMES[x] }
source
share