Subject: | locale zh_CN -> Could not get datetime |
# adapted from http://stackoverflow.com/questions/1867550
use utf8;
use DateTime::Format::CLDR ();
my $cldr = DateTime::Format::CLDR->new(locale => 'zh_CN', on_error => 'croak',);
$cldr->parse_datetime('2009/11/26 下午 04:40:54');
__END__
Show quoted text
> perl -MCarp::Always 4.pl
Could not get datetime for 2009/11/26 下午 04:40:54: /11/26 下午 04:40:54 at
/home/daxim/local/lib/perl5/site_perl/5.10.1/DateTime/Format/CLDR.pm line 907
DateTime::Format::CLDR::_local_croak('DateTime::Format::CLDR=HASH(0xee7b68)', 'Could not get datetime for
2009/11/26 下午 04:40:54: /11/26 下午 ...') called at
/home/daxim/local/lib/perl5/site_perl/5.10.1/DateTime/Format/CLDR.pm line 638
DateTime::Format::CLDR::parse_datetime('DateTime::Format::CLDR=HASH(0xee7b68)', '2009/11/26 下午
04:40:54') called at 4.pl line 4