Thanks for looking at this. There is no urgency for my application to have a fix (I put in a list of holidays instead, so the list needs to be updated once a year when the HK government announces the holidays), but it would be nice to see it work right. Let me know if I can do some testing.
Regards Allan Dyer On 7 Aug 2004 at 8:46, Daisuke Maki wrote: > > I'm trying to use DateTime::Calendar::Chinese to calculate public holidays for > > Hong Kong, as illustrated by this output from a test script, included below. > > > > For 2004, Chinese New Year is 22 January, and there is a leap month after the > > second lunar month. Buddah's Birthday is the 8th day of the 4th lunar month, so > > (taking into account the leap month) that is 26 May. My script returns 26 > > April. Similarly, Tuen Ng is the 5th day of the 5th month, that is 22 June, but > > my script returns 23 May. > > > > The table after "New Moons, Month starts" lists the dates of new moons, the > > first day of the month with leap_month => 0 and the first day of the month with > > leap_month => 1. There is no difference between the last two columns: setting > > leap_month does nothing. > > I've finally pulled out my copy of Calendrical Calculations and have > been rewriting tests for DateTime::Calendar::Chinese, and apparently the > conversion from Chinese date components to gregorian components is > mightly screwed up... > > And this in turn seems to be a problem in DateTime::Event::Chinese. > new_year_before() is returning future dates(!) > > Still poking around... > > --d > -------------------------------------------------------------------- Allan Dyer, CISSP, MHKCS, DFCAE | [EMAIL PROTECTED] Chief Consultant | http://www.yuikee.com.hk/ Yui Kee Computing Ltd. |
