bespokeappstt
Hubstaff freelancer
I'm calculating the difference in days with a jdate plugin. The following works fine within the month:
But I get an extra day when is not the same month. Once $date2 and $date3 are within the same month, the calculation is good. Once its different months I get an extra day. How can I modify the calculation to get the correct days across months? jdate gives the epoc time? Couldn't get much info on jdate from the wiki.
Code:
$date2 = strtotime('{rad_rentals___due_date_out_raw}');
$date3 = strtotime('{rad_rentals___due_date_in_raw}');
return (ceil(($date3 - $date2) / 86400))+1;