Possible Duplicate:
How to get aggregate days from PHP's DateTime::diff?
I have something like this:
$daysDiff = intval($currentDate->diff($dueDate)->format('%R%a'));
in the php documentation for DateInterval::format says:
%R -- "+" for positive interval, "-" for negative
%a -- the total count of days i the interval
I having troubles with the result, always return 6015 as days, with the correct sign, + or -.
I try with different dates for $currentdate
and $dueDate
.
Can any body tell me why this behavior.
Thanks