I get that .later( :1month) is problematic for the last day(s),
particularly someone stepping month by month from 2021-12-31
may not expect to get 2022-03-28. But that can be considered
naive.
But for .later( :1year ) from a leap day, I am finding reports
that -03-1 is legalistically correct
Anything here?
https://www.iso.org/standard/70907.html
https://www.iso.org/standard/70908.html
https://www.iso.org/news/ref2379.html
https://www.iso.org/news/2017/02/Ref2164.html
Or here?
https://www.cl.cam.ac.uk/~mgk25/iso-time.html
https://webspace.science.uu.nl/~gent0113/calendar/isocalendar.
> On 13 Dec 2021, at 05:23, rir wrote:
>
>
> REPL says:
>> Date.new("2024-02-29").later( :1year);
>2025-02-28
>
> Is the following some standard?
I'm not sure...
Basically when moving by month / year, it just basically moves that field in
the date, and then checks for validity of the res
I don't think there is a standard. But the same will happen with
.later(:1month) on a month with 31 days where the day is 31, or a DateTime
with a leapsecond advancing by a unit larger than a second. It minimizes
the changes in nominal units.
On Mon, Dec 13, 2021, 05:23 rir wrote:
>
> REPL says: