Skip Menu |
 

This queue is for tickets about the TimeDate CPAN distribution.

Report information
The Basics
Id: 13675
Status: resolved
Priority: 0/
Queue: TimeDate

People
Owner: Nobody in particular
Requestors: m.romani [...] spinsoft.it
Cc:
AdminCc:

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

Attachments


Subject: Patch to correctly parse dd/mm/yyyy dates
Download (untitled) / with headers
text/plain 424b
Line 128 of file Date/Parse.pm is: ($month,$day) = ($1 - 1,$3); Instead it should be: $day,$month) = ($1,$3 - 1); This simple modification allowed me to correctly parse dates where the first item represents the day of month, and the second one the month (e.g. italian ones). The module would instead insist that the first item was always the month, even if the date was parsed by a Date::Language->new('Italian') object.
[guest - Wed Jul 13 10:27:48 2005]: Patch attached.
Download patch.diff-Bub
text/x-diff 325b
--- Parse.pm Tue Jun 3 11:00:25 2003 +++ Parse.pm.modified Mon Nov 7 11:43:47 2005 @@ -125,7 +125,7 @@ # Date: 12-12-96 (using '-', '.' or '/' ) elsif ($dtstr =~ s#\s(\d+)([\-\./])(\d\d?)(\2(\d+))?\s# #o) { - ($month,$day) = ($1 - 1,$3); + ($day,$month) = ($1,$3 - 1); if ($5) { $year = $5;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.