How can I calculate the day of the week of a date in Ruby? For example, October 28 of 2010 is = Thursday
Say i have date = Time.now.to_date then date.strftime("%A") will print name for the day of the week and to have just the number for the day of the week write date.wday.
date = Time.now.to_date
date.strftime("%A")
date.wday