im having trouble getting the exact number of days. given that I have a date / time that counts hours in counting the number of days below the code, give me zero days
$fisrstDate = new DateTime("2018-03-07 04:46:00");
$secondDate = new DateTime("2018-03-07 11:10:00");
$days=$fisrstDate->diff($secondDate)->days;
Another example: this should give me 2 days, but it only shows 1 day, when my idea is that after 24 hours I want to add another 1 day so that it gives me a way out in 2 days.
$fisrstDate = new DateTime("2018-03-07 04:46:00");
$secondDate = new DateTime("2018-03-08 05:00:00");
$days=$fisrstDate->diff($secondDate)->days;
source
share