Show HN: Daystamp – like timestamp but for storing days (of birth, etc.)
github.com
github.com
Turbo Pascal and its descendants use "days since dec 30, 1899": https://docwiki.embarcadero.com/Libraries/Sydney/en/System.T...
Microsoft Excel uses "days elapsed since January 1, 1900", except on Mac where it uses 1904 as a base (because Microsoft!): https://support.microsoft.com/en-us/office/date-systems-in-e...
Gregorian calendar had "holes" in it, and where those holes are, depends on where and when the date was noted.
To uniquely and usefully identify a daystamp, you need more than proleptic Gregorian calendar, since calculations will lead to unfamiliar historical dates from the past.
How do you represent that date with your daystamp? In proleptic Gregorian calendar, it will be a different date, unfamiliar to people who know the birthdate of Da Vinci.
If a particular area changed from Julian calendar to Gregorian calendar in 1599 on July 1st, there will be no July 2nd-July 11th in recorded dates.
And so forth.
Calendars are hard because there is a lot of circumstantial data. Approach like you take with daystamp is useful for when they have been largely stable worldwide: since 1920 or so. There is no sense in starting the epoch at year 0 (or should it be year 1?), without being aware of the limits.
Sure, even proleptic Georgian calendar (extrapolated into the past) has its uses, which is why it has a name. But it helps to clarify where is it applicable.
Today, now, here in Australia it's January 1st 2023 ..
but in countries and at times when the New Year didn't come about until some part of March or coinciding with Easter changes.. then it would be
January 1st 2022
.. as the New Year hasn't yet arrived.
https://en.m.wikipedia.org/wiki/List_of_adoption_dates_of_th...