On Mon, Nov 24, 2014 at 1:07 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
Isn’t that the problem with “Julian” dates John. There’s more than one flavour!
That was exactly the point of my original question to the OP. I
didn't know which specific definition he meant. However, once it's
established that the input represents some number of days from a fixed
starting point, then it's just a matter of getting your bearings and
adjusting appropriately. You only need one data point, and he did
provide one.
Not quite sure how it can work though when you go that far back
since I seem to recall there were a few calendar adjustments over
the years - wasn’t there one in 1582 when Lilian dates started?
All you have to know is that the point of these days is not for
historical (and political) purposes but for astronomical. In other
words, you have to be able to calculate with these numbers. Different
countries adopted the current worldwide calendar system at different
times, so it's a fool's errand to try to reproduce "official
historical" dates (worse than maintaining the damn database of time
zones and daylight/summer times!).
The choice of starting point is of course arbitrary, but that doesn't
matter. What matters is just that the system is consistent. And it
is. We know that each increment in JD is an increment of one day. We
know that 2014-11-20 is day 2456982. So 2456983 represents
2014-11-21. We just propagate backward and forward as necessary. The
offset I gave in my previous post wasn't just picked out of thin air
to illustrate that it will be "some big number". It was the actual
calculated offset for the date system needed by the OP. My code can
be used verbatim.
John
As an Amazon Associate we earn from qualifying purchases.