End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Time#monday?
monday? → true or false
time.c
View on GitHub ↗
static VALUE
time_monday(VALUE time)
{
wday_p(1);
}
Returns true if self represents a Monday, false otherwise:
Example
t = Time.utc(2000, 1, 3) # => 2000-01-03 00:00:00 UTC t.monday? # => true
Related: Time#tuesday?, Time#wednesday?, Time#thursday?.