How to calculate the number of days from the current moment to a certain point in the next month. I tried this and returns 0 for some reason, the month doesn’t take into account whatever number there is.
function calcDifference($params){ $datetime1 = new DateTime('2016-07-11'); $datetime2 = new DateTime('2016-08-11'); $interval = $datetime1->diff($datetime2); echo $interval->format('%d'); }