Hello,

Consider this code :


    my $formatter
        = DateTime::Format::Strptime->new( pattern => "%d-%b-%G", on_error
=> 'croak' );
    my $date = DateTime->now();
    my $formatted = $formatter->format_datetime($date);
    warn "formatted=$formatted"; # output e.g. 27-May-2009
    my $parsed_date = $formatter->parse_datetime($formatted);


=> got
There is no use providing a month name (May) without providing a year. at
bug_datetime.pl line 8

So the formatting is ok, but the parsing fails, with an incorrect message.

It seems to be a bug, but maybe I missed something. It's problematic because
I reallny need to parse these types of dates (27-May-2009).



P.S
$DateTime::Format::Strptime::VERSION = '1.0901';

Reply via email to