Skip Menu |

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

Report information
The Basics
Id: 38857
Status: resolved
Priority: 0/
Queue: DateTime-Format-Natural

People
Owner: Nobody in particular
Requestors: ankur655 [...] gmail.com
Cc:
AdminCc:

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



Subject: Issue with version 0.72
Date: Fri, 29 Aug 2008 17:49:25 -0700
To: bug-DateTime-Format-Natural [...] rt.cpan.org
From: "Ankur Gupta" <ankur655 [...] gmail.com>
Show quoted text
dateparse> Feb 14, 1997
Invalid day of month (day = 30 - month = 2 - year = 2008) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 Show quoted text
dateparse> Feb 14, 1997
Invalid day of month (day = 30 - month = 2 - year = 2008) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856
On Fri Aug 29 20:53:14 2008, ankur655@gmail.com wrote: Show quoted text
> dateparse> Feb 14, 1997
> Invalid day of month (day = 30 - month = 2 - year = 2008) > at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 >
> dateparse> Feb 14, 1997
> Invalid day of month (day = 30 - month = 2 - year = 2008) > at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856
Thanks for the report. The buggy behavior is due to a table entry within the english metadata class with a slightly wrong dispatch order, which will trigger DateTime's setter methods in the uppermost Base class not as required. I intend to push following changes shortly: Index: lib/DateTime/Format/Natural.pm =================================================================== --- lib/DateTime/Format/Natural.pm (revision 239) +++ lib/DateTime/Format/Natural.pm (working copy) @@ -10,7 +10,7 @@ use List::MoreUtils qw(all any); use Params::Validate ':all'; -our $VERSION = '0.72'; +our $VERSION = '0.72_01'; validation_options( on_fail => sub @@ -597,6 +597,7 @@ Jesse Vincent Jason May Pat Kale + Ankur Gupta =head1 SEE ALSO Index: lib/DateTime/Format/Natural/Lang/EN.pm =================================================================== --- lib/DateTime/Format/Natural/Lang/EN.pm (revision 239) +++ lib/DateTime/Format/Natural/Lang/EN.pm (working copy) @@ -4,7 +4,7 @@ use warnings; use base qw(DateTime::Format::Natural::Lang::Base); -our $VERSION = '1.11'; +our $VERSION = '1.12'; our (%init, %timespan, @@ -890,13 +890,13 @@ [ 'REGEXP', 'REGEXP', 'REGEXP' ], [ { 0 => $RE{monthday}, 1 => $RE{month}, 2 => $RE{year} }, - [ [ 0 ], [ 1 ], [ 2 ] ], - [ '_day', '_month', '_year' ], + [ [ 2 ], [ 1 ], [ 0 ] ], + [ '_year', '_month', '_day' ], ], [ { 0 => $RE{month}, 1 => $RE{monthday}, 2 => $RE{year} }, - [ [ 0 ], [ 1 ], [ 2 ] ], - [ '_month', '_day', '_year' ], + [ [ 2 ], [ 0 ], [ 1 ] ], + [ '_year', '_month', '_day' ], ], ], count_weekday_in_month => [
Subject: Re: [rt.cpan.org #38857] Issue with version 0.72
Date: Sat, 30 Aug 2008 18:39:35 -0700
To: bug-DateTime-Format-Natural [...] rt.cpan.org
From: "Ankur Gupta" <ankur655 [...] gmail.com>
I made these changes - but it didn't seem to help? The error is different now. The year and month are fine but day is bad. Show quoted text
dateparse> Feb 14, 1997
Invalid day of month (day = 31 - month = 2 - year = 1997) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 Show quoted text
dateparse> 10 Feb, 2008
Invalid day of month (day = 31 - month = 2 - year = 2008) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 Show quoted text
dateparse> June 10, 2008
Invalid day of month (day = 31 - month = 6 - year = 2008) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 On Sat, Aug 30, 2008 at 4:19 AM, Steven Schubiger via RT < bug-DateTime-Format-Natural@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38857 > > > On Fri Aug 29 20:53:14 2008, ankur655@gmail.com wrote:
> > dateparse> Feb 14, 1997
> > Invalid day of month (day = 30 - month = 2 - year = 2008) > > at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 > >
> > dateparse> Feb 14, 1997
> > Invalid day of month (day = 30 - month = 2 - year = 2008) > > at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856
> > Thanks for the report. > > The buggy behavior is due to a table entry within the english metadata > class with a slightly wrong dispatch order, which will trigger > DateTime's setter methods in the uppermost Base class not as required. > > I intend to push following changes shortly: > > Index: lib/DateTime/Format/Natural.pm > =================================================================== > --- lib/DateTime/Format/Natural.pm (revision 239) > +++ lib/DateTime/Format/Natural.pm (working copy) > @@ -10,7 +10,7 @@ > use List::MoreUtils qw(all any); > use Params::Validate ':all'; > > -our $VERSION = '0.72'; > +our $VERSION = '0.72_01'; > > validation_options( > on_fail => sub > @@ -597,6 +597,7 @@ > Jesse Vincent > Jason May > Pat Kale > + Ankur Gupta > > =head1 SEE ALSO > > Index: lib/DateTime/Format/Natural/Lang/EN.pm > =================================================================== > --- lib/DateTime/Format/Natural/Lang/EN.pm (revision 239) > +++ lib/DateTime/Format/Natural/Lang/EN.pm (working copy) > @@ -4,7 +4,7 @@ > use warnings; > use base qw(DateTime::Format::Natural::Lang::Base); > > -our $VERSION = '1.11'; > +our $VERSION = '1.12'; > > our (%init, > %timespan, > @@ -890,13 +890,13 @@ > [ 'REGEXP', 'REGEXP', 'REGEXP' ], > [ > { 0 => $RE{monthday}, 1 => $RE{month}, 2 => $RE{year} }, > - [ [ 0 ], [ 1 ], [ 2 ] ], > - [ '_day', '_month', '_year' ], > + [ [ 2 ], [ 1 ], [ 0 ] ], > + [ '_year', '_month', '_day' ], > ], > [ > { 0 => $RE{month}, 1 => $RE{monthday}, 2 => $RE{year} }, > - [ [ 0 ], [ 1 ], [ 2 ] ], > - [ '_month', '_day', '_year' ], > + [ [ 2 ], [ 0 ], [ 1 ] ], > + [ '_year', '_month', '_day' ], > ], > ], > count_weekday_in_month => [ >
Resolved as of v0.72_01.
Subject: Re: [rt.cpan.org #38857] Issue with version 0.72
Date: Sun, 31 Aug 2008 08:54:47 -0700
To: bug-DateTime-Format-Natural [...] rt.cpan.org, schubiger [...] cpan.org
From: "Ankur Gupta" <ankur655 [...] gmail.com>
As I mentioned in my earlier mail the issue still doesn't seem fixed fully. The day is still coming wrong - though year and month area okay now. Am I missing something? Show quoted text
dateparse> Feb 14, 1997
Invalid day of month (day = 31 - month = 2 - year = 1997) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 Show quoted text
dateparse> 10 Feb, 2008
Invalid day of month (day = 31 - month = 2 - year = 2008) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 Show quoted text
dateparse> June 10, 2008
Invalid day of month (day = 31 - month = 6 - year = 2008) at /usr/local/share/perl/5.8.8/DateTime/Format/Natural/Base.pm line 856 On Sun, Aug 31, 2008 at 8:29 AM, Steven Schubiger via RT < bug-DateTime-Format-Natural@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=38857 > > > Resolved as of v0.72_01. >