Skip Menu |

This queue is for tickets about the DateManip CPAN distribution.

Report information
The Basics
Id: 21167
Status: resolved
Priority: 0/
Queue: DateManip

People
Owner: Nobody in particular
Requestors: roseycpanbug.20.ftumsh [...] spamgourmet.com
Cc:
AdminCc:

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



Subject: Date::Manip 5.44 Bug
Date: Thu, 17 Aug 2006 16:10:54 +0100
To: bug-DateManip [...] rt.cpan.org
From: roseycpanbug.20.ftumsh [...] spamgourmet.com
Lo, The code below returns different dates. v5.44 is incorrect. The 17th is a thur so the date returned should be the monday 21st. v5.42a calculates correctly. The week begin and end paramters are at the default, ie 1 and 5. #!/usr/bin/perl -w use strict; use diagnostics; use Date::Manip; my $DATA = '17/Aug/06'; my $deldate = $DATA; my $data = UnixDate( DateCalc($deldate, '+2 business days') , '%s'); print DateCalc($deldate,''), "\n",scalar(gmtime($data)), " $data\n";
Without knowing what results were given, it's hard to know what (if any) bug was seen. However, with the newest version of Date::Manip, I get the following: DateCalc($deldate, '+2 business days') => 2006082108:00:00 (which is correct) $data => 1156165200 scalar(gmtime($data)) => Mon Aug 21 13:00:00 2006 So either this is a bug that was fixed after 5.44 was released, or something else is going on. BTW, the call DateCalc($deldate,'') given in the example is NOT valid. It may be that this is confusing the user.