Subject: | Date_NextWorkDay behaviour change from 5.X to 6.X with holidays |
Hello and thanks for Date::Manip,
When attempting to upgrade from 5.56 to 6.22 I noticed a change in
behaviour that I'm not sure is documented/expected.
us_holidays.cnf contains:
*HOLIDAYS
1*7:0:4:0:0:0*CWD = Independence Day (observed)
use Date::Manip;
Date_Init(q{GlobalCnf=us_holidays.cnf});
my $two_work_days_after_july_1_with_us_hol = Date_NextWorkDay
('20110701',2);
6.22 returns 20110705
5.56 returns 20110706 this is what I'd expect
2011 July
1 Fri
2 Sat
3 Sun
4 Mon holiday
5 Tue
6 Wed <- would expect 6th to be returned
7 Thur
8 Fri
I did read the Changes5to6, and it seems related to:
http://search.cpan.org/~sbeck/Date-Manip-
6.22/lib/Date/Manip/Changes5to6.pod#DATE_PARSING_AND_OPERATIONS
Date_PrevWorkDay behavior
Cheers,
Peter (Stig) Edwards