Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Date#wday

d.wday → fixnum

Returns the day of week (0-6, Sunday is zero).

Example
Date.new(2001,2,3).wday           #=> 6
See also #upto #wednesday? #tuesday? #wnum0 also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1