Subject: | Negative or other early Julian Dates don't convert correctly |
Date: | Tue, 13 Dec 2016 22:22:50 -0500 (EST) |
To: | bug-Astro [...] rt.cpan.org |
From: | msb [...] vex.net (Mark Brader) |
I have "perl 5, version 22, subversion 2 (v5.22.2) built for
x86_64-linux-thread-multi" running on Fedora 23 Linux.
I downloaded Astro::Time from cpan within the last 24 hours.
I don't know how to check which version of it that is.
This program:
use Astro::Time;
foreach my $jd ( -10 .. 420 ) {
my ($d, $m, $y, undef) = mjd2cal(jd2mjd($jd));
printf "%6d => year %4d month %02d day %02d\n", $jd, $y, $m, $d;
}
produces results that don't even appear like a valid progression of dates
until Julian Day 97. For example, part of the output reads:
91 => year -4712 month 03 day -3
92 => year -4712 month 03 day -2
93 => year -4712 month 03 day -1
94 => year -4712 month 03 day 00
95 => year -4712 month 03 day 01
96 => year -4712 month 03 day 01
97 => year -4712 month 03 day 01
98 => year -4712 month 03 day 02
99 => year -4712 month 03 day 03
100 => year -4712 month 03 day 04
And even then the dates are wrong, since that day should be in April,
not March, of year -4712. In fact it shows thirteen months in -4712
(00 to 12), followed on JD 403 by the first day of -4711.
--
Mark Brader | "I'm a little worried about the bug-eater", she said.
Toronto | "We're embedded in bugs, have you noticed?"
msb@vex.net | -- Niven, "The Integral Trees"