Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Time#tuesday?
tuesday? → true or false
time.c
View on GitHub ↗
static VALUE
time_tuesday(VALUE time)
{
wday_p(2);
}
Returns true if self represents a Tuesday, false otherwise:
Example
t = Time.utc(2000, 1, 4) # => 2000-01-04 00:00:00 UTC t.tuesday? # => true
Related: Time#wednesday?, Time#thursday?, Time#friday?.