Subject: | Ordinal dates with leading zero not parsed |
Hello,
this has been found and verified with Perl 5.12.1 on Linux and Perl
5.12.3 on OpenVMS.
In the following test code parsing will fail silently for the last string:
use Date::Manip;
$tstr = "Mar, 9,2011 17:12:00";
my $base_time = ParseDate($tstr);
print "String: ", $tstr, " Base: ", $base_time, "\n";
$tstr = "Mar, 9th,2011 17:12:00";
my $base_time = ParseDate($tstr);
print "String: ", $tstr, " Base: ", $base_time, "\n";
$tstr = "Mar, 09,2011 17:12:00";
my $base_time = ParseDate($tstr);
print "String: ", $tstr, " Base: ", $base_time, "\n";
$tstr = "Mar, 09th,2011 17:12:00";
my $base_time = ParseDate($tstr);
print "String: ", $tstr, " Base: ", $base_time, "\n";
Result:
String: Mar, 9,2011 17:12:00 Base: 2011030917:12:00
String: Mar, 9th,2011 17:12:00 Base: 2011030917:12:00
String: Mar, 09,2011 17:12:00 Base: 2011030917:12:00
String: Mar, 09th,2011 17:12:00 Base:
If would be nice if ordinal with leading Zeros would be parsed correctly
too.
All the best,
Martin