DayOfWeek represents a day of the week in the Gregorian calendar.
time = Time.local(2016, 2, 15) time.day_of_week # => Time::DayOfWeek::Monday
#value returns this ordinal number. It can easily be converted to the also common numbering based on
Sunday = 0 using
value % 7.
Returns the day of week that has the given value, or raises if no such member exists.
© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.