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