Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Time#saturday?

() -> bool
saturday? → true or false

Returns true if self represents a Saturday, false otherwise:

Example
t = Time.utc(2000, 1, 1) # => 2000-01-01 00:00:00 UTC
t.saturday?              # => true

Related: Time#sunday?, Time#monday?, Time#tuesday?.

See also #round #sec #rfc822 #strftime also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0