Subject: | ParseDate bug with dates in format YYYYWwwd |
Date: | Mon, 12 Nov 2012 11:02:34 +0000 |
To: | <bug-date-manip [...] rt.cpan.org> |
From: | Chris Card <ctcard [...] hotmail.com> |
Hi,
This bug appears to be in perl-Date-Manip 6.24 on Centos 6.3 and in the latest perl-Date-Manip 6.36 built on Fedora 16, so I assume it's in all versions of Date::Manip > 6.
I've tried with Perl 5.10.1 (Centos 6.3) and Perl 5.14.3 and Perl 5.16.0 (Fedora 16).
The Perl command
perl -e 'use Date::Manip; $x = ParseDate("2012-W01-1"); print $x . "\n";'
prints
2012010200:00:00
but the command
perl -e 'use Date::Manip; $x = ParseDate("2012-W011"); print $x . "\n";'
prints nothing.
Using the DM5 module instead does work:
DATE_MANIP=DM5 perl -e 'use Date::Manip; $x = ParseDate("2012-W011"); print $x . "\n";'
Looking at the manual page Date::Manip::Date for the definitions of valid date formats, I think 2012-W011 should be accepted as a valid date (and was in
Date::Manip version 5.x).
Chris