Subject: | Error when parsing dates |
Date: | Tue, 2 Dec 2008 23:42:52 -0800 |
To: | bug-DateTime-Format-CLDR [...] rt.cpan.org |
From: | "Senthilvel Rangaswamy" <senthilvel [...] gmail.com> |
I'm using version 1.01 of DateTime::Format::CLDR.
my $datefmt = 'yyyyMMddHH';
my $cldr = new DateTime::Format::CLDR(pattern => $datefmt);
my $date1 = "2008120103";
my $dt1 = $cldr->parse_datetime($date1);
my $string = $cldr->format_datetime($dt1);
print "str1: $string\n";
my $date2 = "2008121003";
my $dt2 = $cldr->parse_datetime($date2);
$string = $cldr->format_datetime($dt2);
print "str2: $string\n";
So both Dec 01 and Dec 10 are parsed as Dec 10.