public static function diffDates($date1, $date2)
    {
        $ts1 = strtotime($date1);
        $ts2 = strtotime($date2);
        
        $seconds_diff = $ts2 - $ts1;
        
        return floor($seconds_diff / 3600 / 24);
    }
public static function diffDates($date1, $date2)
    {
        $ts1 = strtotime($date1);
        $ts2 = strtotime($date2);
        
        $seconds_diff = $ts2 - $ts1;
        
        return floor($seconds_diff / 3600 / 24);
    }
public static function diffDates ( $ date1 , $ date2 ) { $ ts1 = strtotime ( $ date1 ) ; $ ts2 = strtotime ( $ date2 ) ; $ seconds_diff = $ ts2 - $ ts1 ; return floor ( $ seconds_diff / 3600 / 24 ) ; }
diff in days

@param $date1 $date1 string parsable date strtotime(date)
@param $date2 $date2 string parsable date strtotime(date)
@return number
diff in days