Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-Format-Strptime CPAN distribution.

Report information
The Basics
Id: 93865
Status: resolved
Priority: 0/
Queue: DateTime-Format-Strptime

People
Owner: Nobody in particular
Requestors: IKEGAMI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.55



Subject: Pattern for %A rather greedy.
Consider the following code: use DateTime::Format::Strptime qw( ); my $strp = DateTime::Format::Strptime->new( pattern => '%A%m%d_%Y', on_error => 'croak', ); my $string = 'Fri0215_2013'; print $strp->parse_datetime($string)->iso8601(), "\n"; The above fails with Fri02 is not a recognised day in this locale. The parsing pattern is /(\w+)([\d ]?\d)([\d ]?\d)_(\d{4})/ \w+ matches too much. Would it be safe for \pL (letter) to be used instead of \w? Source: http://stackoverflow.com/q/22410253/589924 PS - Would have been nice to have specified %A%02m%02d_%Y to avoid the problem! This would also help in other circumstances.