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

Date#new_start

d.new_start([start=Date::ITALY]) → date

Duplicates self and resets its day of calendar reform.

Example
d = Date.new(1582,10,15)
d.new_start(Date::JULIAN)         #=> #<Date: 1582-10-05 ...>
See also #month #next #monday? #next_day also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1