Re: New pre-SRFI: Modern date and time library Daphne Preston-Kendal 10 Nov 2024 19:52 UTC

On 9 Nov 2024, at 12:49, Alex Shinn <xxxxxx@gmail.com> wrote:

> (chibi chrono) may be of interest for comparison:
>
> https://github.com/ashinn/alschemist/blob/master/chibi/chrono/base.scm
>
> Probably it's more than flexible enough to serve as a reference implementation
> and has some nice things like the Japanese calendar.

Thanks!

Do you think there’s a strong advantage to having ‘chronologies’/calendar systems as first class objects of their own type rather than, as the pre-SRFI suggests, making them an informal set of alternative constructors/accessors for a date type which is common to all calendar systems? That was a feature of an earlier proposal by John Cowan (which this pre-SRFI is still based on, in a sense). But he removed that feature before we started talking together about it, so it doesn’t appear in my distant, mongrel descendant of his idea, either.

Your chronologies also encapsulate a date and time system (not just a calendar of dates) down to the level of the time of day. Is this needed for any actually currently used time-of-day system with a well-defined relationship to TAI or UTC? ‘Babylonian’ time (24 hours in a day, each of 60 minutes of 60 seconds) seems even more universal, to my knowledge, than the Gregorian calendar, but I may be wrong. Most historical time of day measurements are not ‘well-defined’ in this sense, to my knowledge: either nobody has updated them for the era of atomic time-keeping, among other problems such as being based on apparent solar time rather than mean solar time, or just being dependent on the time of sunrise and sunset and thus having units whose length varies seasonally.

Daphne