Re: Perl 5.8.[23] + DateTime::Format::ISO8601 - leap year failure in t/02_examples.t (test code, not main code)

2004-01-19 Thread Joshua Hoblitt
On Sun, 18 Jan 2004, Jonathan Leffler wrote:

 When I try to build DateTime::Format::ISO8601 v0.04, I'm getting a
 test failure in t/02_examples.t:

 t/02_examples.NOK 24# Failed test (t/02_examples.t at line
 156)
 #  got: '2004-04-11'
 # expected: '2004-04-12'
 t/02_examples.ok 140/140# Looks like you failed 1 tests of
 140.
 t/02_examples.dubious

  Test returned status 1 (wstat 256, 0x100)
 DIED. FAILED test 24
  Failed 1/140 tests, 99.29% okay

 I think this is a leap year problem in the test.  The test is:

I've reproduced the bug and agree with your analysis.  I'll get a fixed release out 
soon.

Thanks for reporting this.

-J

--


Perl 5.8.[23] + DateTime::Format::ISO8601 - leap year failure in t/02_examples.t (test code, not main code)

2004-01-18 Thread Jonathan Leffler
Hi,

When I try to build DateTime::Format::ISO8601 v0.04, I'm getting a 
test failure in t/02_examples.t:

t/02_examples.NOK 24# Failed test (t/02_examples.t at line 
156)
#  got: '2004-04-11'
# expected: '2004-04-12'
t/02_examples.ok 140/140# Looks like you failed 1 tests of 
140.
t/02_examples.dubious 

Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 24
Failed 1/140 tests, 99.29% okay
I think this is a leap year problem in the test.  The test is:

{
#-DDD -102
my $dt = DateTime::Format::ISO8601-parse_datetime( '-102' );
my $year = sprintf( %04i, DateTime-now-year );
is( $dt-ymd, ${year}-04-12 );
}
The 102nd day might well be 12th April in a non-leap year, but in a 
leap year such as 2004, it is 11th April.

--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) 
#include disclaimer.h
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/