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

From: Date: Sun, 31 Oct 2010 02:32:12 +0000
Subject: Bug #51184 [Wfx]: DateInterval has incorrect days property on windows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155650@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
 Updated by:         pajoye@php.net
 Reported by:        seld@php.net
 Summary:            DateInterval has incorrect days property on windows
 Status:             Wont fix
 Type:               Bug
 Package:            Date/time related
 Operating System:   Windows
 PHP Version:        5.3.2
 Assigned To:        pajoye
 Block user comment: N

 New Comment:

@php at twinmail dot de

Use VC9 builds instead, from http://windows.php.net


Previous Comments:
------------------------------------------------------------------------
[2010-10-31 02:13:50] php at twinmail dot de

5.3.3 on WINNT is also affected.

------------------------------------------------------------------------
[2010-06-14 12:50:44] pajoye@php.net

Sorry, I meant won't fix. It is not something we can easily fix, use the
VC9 versions instead (apachelounge.com for the VC9 versions of apache).

------------------------------------------------------------------------
[2010-06-14 12:43:28] pluk77 at gmail dot com

Is this bug closed because it is now fixed in VC6 as well, or because it
is seen as not a bug?

------------------------------------------------------------------------
[2010-06-05 04:14:23] ric dot lombardi at gmail dot com

randy, this is not a bug. the format %d just shows the difference
between the two 
day numbers.
If you want the absolute days difference between the dates, you have to
use "%a" 
as format.

------------------------------------------------------------------------
[2010-06-04 22:40:51] randy dot larson at veracitynetworks dot com

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.

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


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 (#155650) next »