Skip to content

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

instance method

Time#tuesday?

tuesday? → true or false

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?.

See also #to_time #tv_nsec #to_s #tv_sec also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0