Comment by elcritch

4 days ago

Reminds me of the old "book the meeting on Feb 31" trick to avoid an unwanted meeting.

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.