X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FCalendar.class.php;h=d3845e8b47b6b353a0c911345eb2c3212d984c6d;hb=19f479eb795f39d331fbfe33ab20534112555630;hp=f160cfa6cf43de12e3ce6000c0937223a9a5aa35;hpb=9819bb63bec83c13dd40ebb2ffc24df5fcfeda33;p=timetracker.git diff --git a/WEB-INF/lib/form/Calendar.class.php b/WEB-INF/lib/form/Calendar.class.php index f160cfa6..d3845e8b 100644 --- a/WEB-INF/lib/form/Calendar.class.php +++ b/WEB-INF/lib/form/Calendar.class.php @@ -171,16 +171,9 @@ class Calendar extends FormElement { $stl_cell = ' class="CalendarDay"'; } - // Handle holidays. - // Prepare a date to check in DB_DATEFORMAT. - $date_to_check = "$thisyear-"; - if (strlen($thismonth) == 1) $date_to_check .= '0'; - $date_to_check .= "$thismonth-"; - if (strlen($start_date+$j) == 1) $date_to_check .= '0'; - $date_to_check .= $start_date+$j; - - // Check if it falls on a holiday. - if (ttTimeHelper::isHoliday2($date_to_check)) { + // holidays + $date_to_check = ttTimeHelper::dateInDatabaseFormat($thisyear, $thismonth, $start_date+$j); + if (ttTimeHelper::isHoliday($date_to_check)) { $stl_cell = ' class="CalendarDayHoliday"'; $stl_link = ' class="CalendarLinkHoliday"'; }