Skip to content

Commit

Permalink
[BUGFIX] Get correct year for weekConfig. Use ISO 8601 week-numbering…
Browse files Browse the repository at this point in the history
… year.
  • Loading branch information
cdaecke authored and derhansen committed Dec 14, 2024
1 parent 2c93853 commit f0e1e2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Service/CalendarService.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ public function getWeekConfig(DateTime $firstDayOfCurrentWeek): array
return [
'previous' => [
'weeknumber' => (int)$firstDayPreviousWeek->format('W'),
'year' => (int)$firstDayPreviousWeek->format('Y'),
'year' => (int)$firstDayPreviousWeek->format('o'),
],
'current' => [
'weeknumber' => (int)$firstDayOfCurrentWeek->format('W'),
'year' => (int)$firstDayOfCurrentWeek->format('Y'),
'year' => (int)$firstDayOfCurrentWeek->format('o'),
],
'next' => [
'weeknumber' => (int)$firstDayNextWeek->format('W'),
'year' => (int)$firstDayNextWeek->format('Y'),
'year' => (int)$firstDayNextWeek->format('o'),
],
];
}
Expand Down

0 comments on commit f0e1e2f

Please sign in to comment.