[racket] min and max representable dates
On Mar 2, 2015, at 6:59 AM, Hendrik Boom <hendrik at topoi.pooq.com> wrote:
> On Sun, Mar 01, 2015 at 04:07:57PM -0800, Jordan Johnson wrote:
>>
>> I expect a pretty conservative estimate is A-OK if it’d be sure of
>> not throwing an error on 32+-bit systems;
>> I see 2^32 seconds would get us at least to the year 2106...
>
> Which is why the world is shifting to 64-bit dates.
Yes, so I’d feel a lot more comfortable if I can give a bigger max than 2^32 (which I expect I can, but want to check). I found that in Racket v6.1.1 the max is 2^31 - 1. In v6.1.1.8 all I’ve determined is that the max is somewhere between 2^55 and 2^56, on the machine I have access to at the moment. I’d be perfectly happy to take 2^55 as the constant, IF it will work on all machines; that’d give 1.1 billion years to implement an improvement. With a coffee break, even.
Best,
jmj