Skip to content

Commit

Permalink
cronjob calweek corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
go-faustino committed Jan 7, 2018
1 parent 95cd496 commit 0293e94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/modules/timemanagement/models/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0293e94

Please sign in to comment.