diff --git a/application/modules/timemanagement/models/Users.php b/application/modules/timemanagement/models/Users.php index d5a697477..93a5334ce 100644 --- a/application/modules/timemanagement/models/Users.php +++ b/application/modules/timemanagement/models/Users.php @@ -141,6 +141,12 @@ public function checkweekdaysdatacron($hidstartweek_date,$hidendweek_date,$hidem $calWeekVal = strftime('%U',strtotime($loopDate)); $dateYearVal = strftime('%Y',strtotime($loopDate)); + + if($calWeekVal == "00") { + $prevYear = $dateYearVal - 1; + $calWeekVal = strftime('%U',strtotime($prevYear.'-12-31')); + } + if(!in_array($calWeekVal,$cal_weekArray)){ $cal_weekArray[] = $calWeekVal; $yearCalWeekArray[$calWeekVal][] = $dateYearVal;