ID:               43965
 User updated by:  develop1 at internet-solutions dot ch
 Reported By:      develop1 at internet-solutions dot ch
 Status:           Open
 Bug Type:         *Calendar problems
 Operating System: Windows XP / Linux
 PHP Version:      5.2.5
 New Comment:

PHP Version 5.2.3


Previous Comments:
------------------------------------------------------------------------

[2008-01-29 12:36:18] develop1 at internet-solutions dot ch

Description:
------------
$arrivalDate = "2008-03-29";
$departureDate = "2008-04-02";

$diff = get_time_difference($arrivalDate, $departureDate);

echo $diff['days'];   (result is: 3)

that's wrong, 'cause it must be 4. (30, 31, 1, 2)

I notice that 31 march 2008 (isn't reconized)

I thought it was caused by 29 february, but in 2004, 2000 and 2012 it's
working fine.



Reproduce code:
---------------
$arrivalDate = "2008-03-29";
$departureDate = "2008-04-02";

$diff = get_time_difference($arrivalDate, $departureDate);

echo $diff['days']; 

Expected result:
----------------
$diff => must be 4, and not 3

Actual result:
--------------
3


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


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

Reply via email to