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";