Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 4037
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: pdenis [...] fotango.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.1703
Fixed in: 0.1705



Subject: Date subtraction unreliable
perl 5.8.0 / RedHat 9 / DateTime 0.1703 The attached file contains 4 tests, I think they all should pass, but they fail. Hope this helps
#! /usr/bin/perl ## DateTime bug report ## ## 07-10-2003 ## Pierre Denis pdenis@fotango.com ## use strict; use warnings; use DateTime; use Test::More tests => 4; my $date1 = DateTime->new( year => 2003, month => 9, day => 30 ); my $date2 = DateTime->new( year => 2003, month => 10, day => 1 ); my $date4 = DateTime->new( year => 2003, month => 10, day => 31 ); my $date5 = DateTime->new( year => 2003, month => 11, day => 1 ); my $date7 = DateTime->new( year => 2003, month => 2, day => 28 ); my $date8 = DateTime->new( year => 2003, month => 3, day => 1 ); my $date10 = DateTime->new( year => 2003, month => 1, day => 31 ); my $date11 = DateTime->new( year => 2003, month => 2, day => 1 ); my $diff1 = $date2 - $date1; is( $diff1->delta_days, 1); my $diff2 = $date5 - $date4; is( $diff2->delta_days, 1); my $diff3 = $date8 - $date7; is( $diff3->delta_days, 1); my $diff4 = $date11 - $date10; is( $diff4->delta_days, 1 );