Skip Menu |

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

Report information
The Basics
Id: 53580
Status: new
Priority: 0/
Queue: DateTime-Format-Duration

People
Owner: Nobody in particular
Requestors: david.tulloh [...] AirservicesAustralia.com
Cc:
AdminCc:

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



Subject: Two digit formats do not take two digits
Date: Mon, 11 Jan 2010 15:45:49 +1100
To: <bug-DateTime-Format-Duration [...] rt.cpan.org>
From: "Tulloh, David" <david.tulloh [...] AirservicesAustralia.com>
The two digit patterns (eg. %H and %M) do not actually read in two digits. Using the input pattern %H%M and input data of 0080 I get 4800 minutes (80 hours) instead of the expected 80 minutes. Dumping out the parser regex I get / *([+-]?\\d+) *([+-]?\\d+)/. So the two digits expected are being parsed as \d+ instead of \d{2}. The first parameter greadily sucks up three digits instead of two. The precision parameters provide a suitable work around. In this example %2H%2M provides the behaviour that was initially expected. This may be related to bug #47764.