X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTimeHelper.class.php;h=57790e22bde7aa7af3565ed82780132733a48f65;hb=8a671525046655e057a15c6de9507834322b466d;hp=6fd816e0cd010f5c37dd90ff731bba375a789d8a;hpb=040c6516659e15f360159859b783e3722e86f370;p=timetracker.git diff --git a/WEB-INF/lib/ttTimeHelper.class.php b/WEB-INF/lib/ttTimeHelper.class.php index 6fd816e0..57790e22 100644 --- a/WEB-INF/lib/ttTimeHelper.class.php +++ b/WEB-INF/lib/ttTimeHelper.class.php @@ -33,6 +33,11 @@ class ttTimeHelper { // isWeekend determines if $date falls on weekend. static function isWeekend($date) { + // NOTE: this does not work for subgroups with different WEEKEND_START_DAY + // as the setting is per server. Example: a parent group in USA, with a subgroup + // in Saudi Arabia. Their weekends are the same. + // Decided NOT to introduce a configurable WEEKEND_START_DAY for groups in UI + // to keep UI simple, for now. See also Calendar class with the same issue. $weekDay = date('w', strtotime($date)); return ($weekDay == WEEKEND_START_DAY || $weekDay == (WEEKEND_START_DAY + 1) % 7); }