I'm trying to use date_diff to compare two dates, but it's not even coming close to the right number. To troubleshoot, I'm doing a simple hard-coded test:
$date1 = date_create("2014-03-20");
$date2 = date_create("2017-11-13");
$diff = date_diff($date1,$date2);
echo $diff->format('%r%d');
This outputs "24" for me -- so it's not even in the ballpark. Any ideas what's going wrong here?