Subject: | Holiday config file for NZ fails to recognize all holidays |
Date: | Thu, 26 Feb 2015 11:51:12 -0500 |
To: | bug-Date-Manip [...] rt.cpan.org |
From: | Jeff Boes <jeff [...] endpoint.com> |
Perl version: 5.10.0
Module version: 5.54
Here is a configuration file we are working on for NZ:
----snip----
WorkWeekBeg = 1
WorkWeekEnd = 5
WorkDayBeg = 0:00
WorkDayEnd = 23:59
*Holiday
# Other New Zealand holidays; see:
# http://en.wikipedia.org/wiki/Public_holidays_in_New_Zealand
1*1:0:2:0:0:0*NWD = Day after New Year's Day (observed)
1*1:0:1:0:0:0*NWD = New Year's Day (observed)
1*2:0:6:0:0:0*NWD = Waitangi Day (observed)
1*0:0:0:0:0:0*EASTER,PD5 = Good Friday (Friday before Easter)
1*0:0:0:0:0:0*EASTER,ND1 = Easter Monday (Monday after Easter)
1*4:0:25:0:0:0*NWD = Anzac Day (observed)
first Monday in June = Queen's Birthday
fourth Monday in October = Labour Day (New Zealand)
1*12:0:24:0:0:0*FW1 = Christmas Day (observed)
1*12:0:25:0:0:0*FW1 = Boxing Day (observed)
# United States UPS holidays
# ** must be defined after country specific, so that New Year's/Christmas Day calc above is done correctly
January 1 = New Year's Day
last Monday in May = Memorial Day (U.S.)
July 4 = Independence Day (U.S.)
first Monday in September = Labour Day
fourth Thursday in November = Thanksgiving Day (U.S.)
December 25 = Christmas Day
December 31 = New Year's Eve
----snip----
With this configuration loaded, the dates
2013-12-27
2014-12-29
2015-12-29
are all recognized as holidays, incorrectly. If you comment out the two lines here:
#1*1:0:2:0:0:0*NWD = Day after New Year's Day (observed)
#1*1:0:1:0:0:0*NWD = New Year's Day (observed)
then the three dates are NOT recognized as holidays (correct), but then 2013-01-02, 2014-01-02, and 2015-01-02 are no
longer holidays (expected but incorrect).
--
Jeff Boes <><
jeff@endpoint.com
269-408-0811