End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Time#sunday?
time.sunday? → true or false
time.c
View on GitHub ↗
static VALUE
time_sunday(VALUE time)
{
wday_p(0);
}
Returns true if time represents Sunday.
Example
t = Time.local(1990, 4, 1) #=> 1990-04-01 00:00:00 -0600 t.sunday? #=> true