Search code examples
ruby

How to get current day name from Date.today?


How does someone get the name of the day from Date.today?

The below should be equal too "Fri" or "Friday":

Date.today #=> Fri, 20 Nov 2015

Solution

  • Use the following:

    Date.today.strftime("%A")