[tz] Direct implementation of mktime_z
howard.hinnant at gmail.com
Tue Sep 27 14:45:27 UTC 2022
On Sep 27, 2022, at 5:54 AM, Ted Phelps via tz <tz at iana.org> wrote:
> On 27/9/22 14:17, Bradley White wrote:
>> Assuming we want to model the proleptic Gregorian calendar, it would be nice if the output was linear over all inputs. At the moment, for example, daynum(0, 2, 29) and daynum(0, 3, 1) both return -305.
> Ah, nice find! I forgot to compensate for division by negative numbers, and my test suite doesn't cover times before about 1800. I'll fix both shortcomings shortly.
If it helps, public domain calendrical algorithms for the proleptic Gregorian calendar that have a domain of validity of +/- millions of years, centered on the Unix epoch:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Message signed with OpenPGP
More information about the tz