Skip to content

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

instance method

Date#succ

succ

Alias of #next

Returns a new Date object representing the following day:

Example
d = Date.new(2001, 2, 3)
d.to_s      # => "2001-02-03"
d.next.to_s # => "2001-02-04"

Date#succ is an alias for Date#next.

See also #next #strftime #sunday? #step also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0