2 ms·
Given a date, how do you obtain a new date equal to the same month and day of month in the following year? You can't do that consistently with a duration measu
by kbolino 13y ago
Given a date, how do you obtain a new date equal to the same month and day of month in the following year?
You can't do that consistently with a duration measured in milliseconds or nanoseconds. Instead, you need a more abstract representation of time, something akin to "increment only the year field of a date".
That's what Periods are for.