Get span between two dates
This function will return how many days there are between two UNIX timestamps.
function GetSpan ($date1, $date2) {
// Return how many days there are between two UNIX timestamps
$days = 60 * 60 * 24;
return floor(($date2 - $date1) / $days);
}
Leave a comment