Subject: | Bug: bad conversions in December 1775 |
Date: | Sun, 24 Aug 2008 12:25:13 -0400 (EDT) |
To: | bug-DateTime-Calendar-Japanese [...] rt.cpan.org |
From: | mskala [...] ansuz.sooke.bc.ca |
I'm using DateTime-Calendar-Japanese-0.06001 with perl v5.10.0 built for
i686-linux-ld; uname -a reports "Linux opal 2.6.19.1 #1 Tue Jan 9 20:55:16
EST 2007 i686 unknown".
For some dates in December 1775 Gregorian, the
DateTime::Calendar::Japanese module produces bizarre results that cannot
be correct when converting Gregorian dates to the lunisolar calendar.
See the attached code, which produces this output:
Asia/Tokyo
1775-12-20: ANNEI 4, month 11, day 28
1775-12-21: ANNEI 4, month 11, day 29
1775-12-22: ANNEI 4, month 11, day 30
1775-12-23: ANNEI 4, month 11, day 1
1775-12-24: ANNEI 4, month 11, day 2
Asia/Shanghai
1775-12-20: ANNEI 4, month 11, day 28
1775-12-21: ANNEI 4, month 11, day 29
1775-12-22: ANNEI 4, month 12, day 1
1775-12-23: ANNEI 4, month 11, day 2
1775-12-24: ANNEI 4, month 11, day 3
The dates after 22 December change depending on the time zone - which
might be correct for some cases because of the date following Chinese
time, but there shouldn't be a big enough time difference between Tokyo
and Shanghai for it to make a difference in this case given that the input
dates are all using 12:00 noon.
Be that as it may, reverting to month 11 on 23 December seems to be
incorrect for both zones.
--
Matthew Skala
mskala@ansuz.sooke.bc.ca Embrace and defend.
http://ansuz.sooke.bc.ca/
Message body is not shown because sender requested not to inline it.