I tried to get the difference from two dates with this code
<?php
$date1=date_create("2013-03-15");
$date2=date_create("2013-12-12");
$diff=date_diff($date1,$date2);
echo $diff->format("%R%a days");
?>
Is there a way to return an integer instead of a formatted string?
Thanks :)