Skip Menu |

This queue is for tickets about the Date-Calc CPAN distribution.

Report information
The Basics
Id: 119077
Status: open
Priority: 0/
Queue: Date-Calc

People
Owner: Nobody in particular
Requestors: paul [...] roar-it.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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 ------------------------------
Subject: Re: [rt.cpan.org #119077] AutoReply: add_delta_workdays giving wrong day after GB may holiday
Date: Wed, 30 Nov 2016 17:40:20 +0000
To: bug-Date-Calc [...] rt.cpan.org
From: Paul McKay <paul [...] roar-it.com>
I'm thinking that it could possibly be a bug in Year.pm around line 525 else { $index = $max + 1; } I think that maybe we would need else { $rest = -= 1.0; $index = $max + 1; } as we are moving the index on a day? ------------------------------ Paul McKay Founder and Lead Developer Tel: 07923 419905 roar-it.com ------------------------------ On Wed, Nov 30, 2016 at 5:06 PM, Bugs in Date-Calc via RT < bug-Date-Calc@rt.cpan.org> wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "add_delta_workdays giving wrong day after GB may holiday", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #119077]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=119077 > > Please include the string: > > [rt.cpan.org #119077] > > in the subject line of all future correspondence about this issue. To do > so, > you may reply to this message. > > Thank you, > bug-Date-Calc@rt.cpan.org > > ------------------------------------------------------------------------- > 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 > ------------------------------ >
Subject: Re: [rt.cpan.org #119077] AutoReply: add_delta_workdays giving wrong day after GB may holiday
Date: Wed, 30 Nov 2016 18:20:01 +0000
To: bug-Date-Calc [...] rt.cpan.org
From: Paul McKay <paul [...] roar-it.com>
Please close this down, realised I was misunderstanding how add_delta_workdays acted. ------------------------------ Paul McKay Founder and Lead Developer Tel: 07923 419905 roar-it.com ------------------------------ On Wed, Nov 30, 2016 at 5:40 PM, Paul McKay <paul@roar-it.com> wrote: Show quoted text
> I'm thinking that it could possibly be a bug in Year.pm around line 525 > > else { $index = $max + 1; } > > I think that maybe we would need > > else { $rest = -= 1.0; $index = $max + 1; } > > as we are moving the index on a day? > > > ------------------------------ > Paul McKay > Founder and Lead Developer > Tel: 07923 419905 > roar-it.com > ------------------------------ > > On Wed, Nov 30, 2016 at 5:06 PM, Bugs in Date-Calc via RT < > bug-Date-Calc@rt.cpan.org> wrote: >
>> >> Greetings, >> >> This message has been automatically generated in response to the >> creation of a trouble ticket regarding: >> "add_delta_workdays giving wrong day after GB may holiday", >> a summary of which appears below. >> >> There is no need to reply to this message right now. Your ticket has been >> assigned an ID of [rt.cpan.org #119077]. Your ticket is accessible >> on the web at: >> >> https://rt.cpan.org/Ticket/Display.html?id=119077 >> >> Please include the string: >> >> [rt.cpan.org #119077] >> >> in the subject line of all future correspondence about this issue. To do >> so, >> you may reply to this message. >> >> Thank you, >> bug-Date-Calc@rt.cpan.org >> >> ------------------------------------------------------------------------- >> 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 >> ------------------------------ >>
> >
Subject: Re: [rt.cpan.org #119077] add_delta_workdays giving wrong day after GB may holiday
Date: Wed, 30 Nov 2016 23:20:44 +0100
To: "bug-Date-Calc [...] rt.cpan.org" <bug-Date-Calc [...] rt.cpan.org>
From: "O. STeffen BEYer" <ostbey [...] gmail.com>
Unfortunately the routine in question is deeply flawed, especially with negative offsets (almost never works correctly in that case). More unfortunate still is that I will not be able to fix it. Volunteers are very welcome! Best regards, Steffen On Wednesday, 30 November 2016, Paul McKay via RT <bug-Date-Calc@rt.cpan.org> wrote: Show quoted text
> Wed Nov 30 12:06:30 2016: Request 119077 was acted upon. > Transaction: Ticket created by paul@roar-it.com <javascript:;> > Queue: Date-Calc > Subject: add_delta_workdays giving wrong day after GB may holiday > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: paul@roar-it.com <javascript:;> > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119077 > > > > 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 > ------------------------------ > >
-- Sent from my mobile phone. See also: http://www.fluomedia.org/ - Underwater Fluorescence (Scuba Diving) http://sb.fluomedia.org/download/ - Free Perl and C Software