Zefram schreef: > Eugene van der Pijll wrote: > >is any instance where DateTime gets it wrong, please let us know. > > There's leap seconds, but I presume that's intentional. AFAIK DateTime > operates correctly within its designed limits.
Leap seconds are one of the things DateTime tries to get right, and I think it generally does. The only place it intentionally ignores the problem is in the epoch-related methods, like epoch(), from_epoch() and hires_epoch(), where it follows the POSIX standard. > >I think DateTime::Format::Epoch contains most of the functionality of > >your Date::JD. > > I think there'll be resolution issues, and possibly time-of-day model > problems. The biggest problem is the timezone stuff, though. And, as I > said, DateTime has no concept matching what a CJDN (or a JDN) represents. My Epoch modules can use integers, floats, or Math::Bigints internally. The resolution of a standard perl float is about 1 in 1e16, which is 1 second in 1e8 years. It's enough for my needs anyway. And I think you'll find that the timezone stuff also just works. I don't understand why you say DT does not know about CJDNs. It is true that the exact definition of a CJDN is not implemented by DT, but the snippet of code in my previous mail takes care of that. DT is built around the very similar concept of RDN, rata die. Conversion of DT::Calendars is always done by transforming to RD's and back, so it's conceptionally not that different from your modules. > >Those modules are certainly on-topic on this mailing list, > > Ah, I was mistaken then. I'd be interested in suggestions people can > make about those too. I've tried to make them all interoperate nicely. I'm browsing through your modules' docs, and it looks like you really know your stuff about time scales, so I don't know if I can give you any suggestions. On the other hand, I was planning to implement several of the same things for DateTime (GPS, TAI, perhaps even the rubber seconds of the 60s), so your implementations and documentation will be useful. I don't think I'll be using your modules much, though. I don't need subsecond precision; my hobby is genealogy, and I'm already happy if I get the year right. ;-) Eugene