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
ext/date/date_core.c
View on GitHub ↗
static VALUE
d_lite_wday(VALUE self)
{
get_d1(self);
return INT2FIX(m_wday(dat));
}
Returns the day of week (0-6, Sunday is zero).
Example
Date.new(2001,2,3).wday #=> 6