97jaz / gregor

Date and time library for Racket
45 stars 10 forks source link

Fixes issue where otherwise equal datetimes have different JDs: #6

Closed 97jaz closed 9 years ago

97jaz commented 9 years ago

date+time->datetime and posix->datetime were computing the JD in different ways (because it was more efficient that way). Unfortunately, the different methods of computation don't give the same results, so now posix->datetime has to do a bit more work.

Of course, storing the JD in the datetime struct isn't necessary. Caching it is a performance win in some cases and a loss in others.