in reply to DateTime::Format::Strptime - strftime formats not working?

I haven't looked at the code, but testing indicates the following are probably true:

1) %g and %G do not seems to be recognized as year formats; only %y and %Y seem to work. I think %g and %G are meant to be used in conjunction with ISO 8601 week numbers (e.g. %V).

2) adding a space helps a lot - otherwise only a single year digit works:

$date = "05Jul 08"; # work with pattern => "%d%b %y" $date = "05Jul8"; # works with pattern => "%d%b%y"

Replies are listed 'Best First'.
Re^2: DateTime::Format::Strptime - strftime formats not working?
by initself (Monk) on Jul 10, 2008 at 22:57 UTC
    I wonder why zero-filled date values are not accepted. I guess these formats come from old C libraries (and are therefore not easily improved upon)? Thanks for your help, I'm all set now!