Skip to content

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

instance method

Time#thursday?

time.thursday? → true or false

Returns true if time represents Thursday.

Example
t = Time.local(1995, 12, 21)     #=> 1995-12-21 00:00:00 -0600
t.thursday?                      #=> true
See also #sunday? #to_a #subsec #to_date also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1