Log 2179
07/11/2023 2023-11-07 14:49$currentDate = date(‘d/m/Y’);
$taskDate = #תאריך המשימה#;
function calculateDateDifference($current, $task) {
$currentArr = explode(‘/’, $current);
$taskArr = explode(‘/’, $task);
$currentTimestamp = mktime(0, 0, 0, (int)$currentArr[1], (int)$currentArr[0], (int)$currentArr[2]);
$taskTimestamp = mktime(0, 0, 0, (int)$taskArr[1], (int)$taskArr[0], (int)$taskArr[2]);
return abs(round(($currentTimestamp – $taskTimestamp) / (60 * 60 * 24)));
}
return calculateDateDifference($currentDate, $taskDate);