Heh, I save periodic events as intervals in the database. The upside is it handles weird things like this surprisingly robustly, the downside is that months are months past the start of the year and days are days past the start of the month, yes every thing is zero based. I like it, I feel like I am rebelling against a broken system, but have to make sure I do a conversion to one based months and days for everyone else. Time of day and years are fine, time is already zero based and nobody cares about seeing a year 0.
So the example given Feb-31 is stored as 1 month + 30 days past the start of the year and would trigger right on time march 2nd or 3rd, depending on leap year. In fact I started doing it to handle birthdays on leap day, there is not always a February 29, but there is always a day 29 days after the start of February.
Treating birthdays on Feb 29 as if they happened on March 1 in non-leap years is wrong in places like California and New York -- at least probably most of the time, because while I already knew that, I didn't appreciate how deep the rabbit hole actually goes.
Heh, I save periodic events as intervals in the database. The upside is it handles weird things like this surprisingly robustly, the downside is that months are months past the start of the year and days are days past the start of the month, yes every thing is zero based. I like it, I feel like I am rebelling against a broken system, but have to make sure I do a conversion to one based months and days for everyone else. Time of day and years are fine, time is already zero based and nobody cares about seeing a year 0.
So the example given Feb-31 is stored as 1 month + 30 days past the start of the year and would trigger right on time march 2nd or 3rd, depending on leap year. In fact I started doing it to handle birthdays on leap day, there is not always a February 29, but there is always a day 29 days after the start of February.
Treating birthdays on Feb 29 as if they happened on March 1 in non-leap years is wrong in places like California and New York -- at least probably most of the time, because while I already knew that, I didn't appreciate how deep the rabbit hole actually goes.
* https://leginfo.legislature.ca.gov/faces/codes_displaySectio...
* https://www.nysenate.gov/legislation/laws/GCN/58
FWIW, Rare Disease Day is celebrated on Feb. 29.