Skip to content

Commit

Permalink
Merge pull request #1301 from cdaecke/master
Browse files Browse the repository at this point in the history
[BUGFIX] Get correct year for weekConfig. Use ISO 8601 week-numbering year
  • Loading branch information
derhansen authored Dec 14, 2024
2 parents c659cbe + e8bb8af commit 1445a80
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 @@ -165,15 +165,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 1445a80

Please sign in to comment.