$date1 = strtotime(#תאריך התחלה#); $date2 = strtotime(#תאריך סיום בפועל#);
$diff = abs($date2 – $date1); $daysDifference = floor($diff / (60 * 60 * 24));
return $daysDifference;