Subject: | add_delta_workdays giving wrong day after GB may holiday |
Date: | Wed, 30 Nov 2016 17:06:13 +0000 |
To: | bug-Date-Calc [...] rt.cpan.org |
From: | Paul McKay <paul [...] roar-it.com> |
Hi,
use Date::Calendar;
my $calendar =
Date::Calendar->new($Date::Calendar::Profiles::Profiles->{GB});
my $date = $calendar->add_delta_workdays(2016,5,1,1);
my ($year,$month,$day,undef,undef,undef) = $date->datetime();
print "year = $year, month = $month, day = $day\n";
The GB_Early_May in Profiles.pm returns the correct date for the holiday of
2016/05/02 (a Monday) but add_delta_workdays with 1 day after the 1st of
the month, returns the 4th rather than the 3rd.
Tried to debug myself but was a bit bamboozled!
Any help much appreciated.
Paul
------------------------------
Paul McKay
Founder and Lead Developer
Tel: 07923 419905
roar-it.com
------------------------------