Re: Question about caldate_mjd()
Tim Goodwin <[email protected]> 16 Sep 2003 09:46:02 -0000
| Newsgroups | gmane.comp.lib.libtai |
|---|---|
| Message-ID | <[email protected]> |
> Ooops .. let me restate that... Something, 111AD? (1859 years before > 1970 if I calculate right) My confustion stems from this line: > > d = cd->day - 678882L; I confess that I don't fully understand the algorithm, but I can shed some light. Modified Julian date 0 == 1858-11-17 00:00:00. The 1970 epoch doesn't come into the caldate format; the `year' member is simply the year (2003 CE => 2003, etc.). So I'm reasonably sure that 678882 is the number of days from the beginning of the common era till 1858-11-17. (With a rough reckoning I get to 678942 days, but I don't know enough historical background to calculate the exact figure - if, indeed, there is one!) Tim.