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#wednesday?

time.wednesday? → true or false

Returns true if time represents Wednesday.

Example
t = Time.local(1993, 2, 24)      #=> 1993-02-24 00:00:00 -0600
t.wednesday?                     #=> true
See also #wday #xmlschema #utc_offset #yday also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1