Sunday is new week too.

wraping timetables.
Heading.
This commit is contained in:
L_DA 2020-09-13 19:35:33 +00:00
parent e642b6702c
commit 951a121dfa
3 changed files with 8 additions and 2 deletions

View file

@ -172,7 +172,7 @@ class mod_timetable_external extends external_api {
$today = new \DateTime();
$params['week'] = $today->format("W");
$dayofweek = $today->format('w');
if ($dayofweek > 5 + get_config('timetable', 'saturday')) {
if (($dayofweek > 5 + get_config('timetable', 'saturday')) || ($dayofweek == 0)) {
$params['week']++;
}
}