Skip Menu |

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

Report information
The Basics
Id: 47691
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: DateTime-Incomplete

People
Owner: FGLOCK [...] cpan.org
Requestors: alex [...] framexpeditions.com
Cc:
AdminCc:

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



Subject: 29 feb 2009 -> to_datetime fails...
Hi Flavio I'm using your module with pleasure, but I have a little concern. we are in 2009. If I make the test my $dti = DateTime::Incomplete->new( month => 2, day => 29, year=>2000); ok($dti->to_datetime(), "29 feb 2000"); I get... Invalid day of month (day = 29 - month = 2 - year = 2009) at /Library/Perl/5.8.8/DateTime/Incomplete.pm line 639 looking around line 639 for $key ( <b>reverse @FIELDS_SORTED</b> ) { $value = $self->{has}{$key}; next unless defined $value; if ( $key eq 'time_zone' ) { $result->set_time_zone( $value ); next; } $result->set( $key => $value ); } and the year is set at the end of the process, thus is 2009 when 29th of feb is set => error!!!! I you wrote the code in 2008, you had not hit that problem... cheers Alex
Subject: Re: [rt.cpan.org #47691] 29 feb 2009 -> to_datetime fails...
Date: Thu, 9 Jul 2009 00:15:05 +0200
To: bug-DateTime-Incomplete [...] rt.cpan.org, datetime <datetime [...] perl.org>
From: "Flavio S. Glock" <fglock [...] gmail.com>
DateTime::Incomplete 0.04 2009-07-08 - to_datetime() failed when the current year is a non-leap year and the incomplete date is a leap day, bug reported by Alexandre Masselot. Flávio S. Glock 2009/7/8 Alexandre Masselot via RT <bug-DateTime-Incomplete@rt.cpan.org>: Show quoted text
> Wed Jul 08 05:43:35 2009: Request 47691 was acted upon. > Transaction: Ticket created by ALEXMASS >       Queue: DateTime-Incomplete >     Subject: 29 feb 2009 -> to_datetime fails... >   Broken in: (no value) >    Severity: Important >       Owner: Nobody >  Requestors: alexandre.masselot@genebio.com >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=47691 > > > > Hi Flavio > > I'm using your module with pleasure, but I have a little concern. > > we are in 2009. If I make the test > my $dti = DateTime::Incomplete->new( month => 2, day => 29, year=>2000); > ok($dti->to_datetime(), "29 feb 2000"); > > I get... > Invalid day of month (day = 29 - month = 2 - year = 2009) >  at /Library/Perl/5.8.8/DateTime/Incomplete.pm line 639 > > looking around line 639 >    for $key ( <b>reverse @FIELDS_SORTED</b> ) >    { >        $value = $self->{has}{$key}; >        next unless defined $value; >        if ( $key eq 'time_zone' ) >        { >            $result->set_time_zone( $value ); >            next; >        } >        $result->set( $key => $value ); >    } > > and the year is set at the end of the process, thus is 2009 when 29th of > feb is set => error!!!! > > I you wrote the code in 2008, you had not hit that problem... > > cheers > Alex > > >