3 ms·
Using an epoch of jan 1 1601 is ... interesting since it means you would have to deal with the switch from julian to gregorian calendar in september 1752. This
by bborud 2y ago
Using an epoch of jan 1 1601 is ... interesting since it means you would have to deal with the switch from julian to gregorian calendar in september 1752. This included dropping 11 days.
Calendars and historic records is a pain.
- zosima 2y agoDifferent countries switched to the Gregorian calendar at different times. Pope Gregory XIII papal bull went into effect October 1582, see: https://en.wikipedia.org/wiki/Gregorian_calendar https://en.wikipedia.org/wiki/Gregorian_calendar And so 15 October 1582 used to be the 0 for some COBOL date functions. Later that was changed to Jan 1 1600. In IBM's systems you can control what you prefer by a switch: https://www.ibm.com/docs/en/zos/2.4.0?topic=services-date-limits https://www.ibm.com/docs/en/zos/2.4.0?topic=services-date-li...
- adbachman 2y agoNo joke, I actually hit this condition in a test suite and ended up stumbling across the October 1582 date in a Ruby library. It wasn't until I searched "October 10 1582" on the Web that I learned the significance. https://gist.github.com/abachman/f97806e1c0fe8e4e1849e5f8412fd339#observations https://gist.github.com/abachman/f97806e1c0fe8e4e1849e5f8412... tl;dr - MySQL uses 1000-01-01 as the minimum value for a datetime field. Different Ruby libraries use different methods to represent dates, which can lead to situations that appear to claim that 1000-01-01 != 1000-01-01.
- twic 2y agoI assume they just use the Gregorian calendar throughout - roughly what is called "proleptic Gregorian" [1], although since the Gregorian calendar started on 15 October 1582, which is before 1601, it's not really proleptic. Just barely retroleptic. [1] https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar