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

time.saturday? → true or false

Returns true if time represents Saturday.

Example
t = Time.local(2006, 6, 10)      #=> 2006-06-10 00:00:00 -0500
t.saturday?                      #=> true
See also #round #sec #rfc822 #strftime also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1