Skip to content

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

instance method

Time#sunday?

sunday? → true or false

Returns true if self represents a Sunday, false otherwise:

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

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

See also #subsec #thursday? #strftime #to_a also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0