Bug #51184 [Com]: DateInterval has incorrect days property on windows

From: Date: Fri, 04 Jun 2010 20:40:52 +0000
Subject: Bug #51184 [Com]: DateInterval has incorrect days property on windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151096@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51184&edit=1

 ID:               51184
 Comment by:       randy dot larson at veracitynetworks dot com
 Reported by:      seld@php.net
 Summary:          DateInterval has incorrect days property on windows
 Status:           Re-Opened
 Type:             Bug
 Package:          Date/time related
 Operating System: Windows
 PHP Version:      5.3.2
 Assigned To:      pajoye

 New Comment:

I have with PHP 5.3.2 on Cent OS 5.4 running the following code from the
CLI:

$datetime1 = new DateTime('2009-10-11');
$datetime2 = new DateTime('2009-11-13');
$interval = $datetime1->sub($datetime2);
echo $interval->format('%R%d days');

This prints "+2 days" where it should print "+33 days". It appears that
it doesn't add the month.


Previous Comments:
------------------------------------------------------------------------
[2010-05-19 16:20:08] seld@php.net

VC6 NTS fails as well here. VC9 NTS works.

------------------------------------------------------------------------
[2010-05-19 15:45:07] pluk77 at gmail dot com

Done so. Tested the VC6 and VC9 builds. The VC6 build still has this bug
while the VC9 does not.

------------------------------------------------------------------------
[2010-05-19 15:22:51] seld@php.net

Can you try with VC9? Works here on latest VC9 Non Thread Safe

------------------------------------------------------------------------
[2010-05-19 15:20:33] pluk77 at gmail dot com

I am using this version:

PHP5.3.2 VC6 x86 Thread Safe (2010-Mar-04 20:11:08)

and the bug still shows.

Can anybody else confirm this bug is still open?

------------------------------------------------------------------------
[2010-05-19 11:54:18] seld@php.net

Confirmed working here. Kalle's comment came after 5.3.2 and I thought
the commit was younger too, but it seems good in 5.3.2 indeed.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51184


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51184&edit=1


Thread (28 messages)

« previous php.bugs (#151096) next »