Skip to content

Commit

Permalink
Fix switching weeks when week 1 starts before the new year
Browse files Browse the repository at this point in the history
Closes #19
Closes #51

Co-authored-by: Herman Karlsson <[email protected]>
Co-authored-by: Oskar Strömberg <[email protected]>
  • Loading branch information
3 people committed Nov 4, 2024
1 parent 0c59a2d commit 7f81e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/EntityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ public function getShow($id, $year = null, $week = null, $highlightId = -1)
->with('week', $week)
->with('year', $year)
->with('nextWeek', date("W", strtotime("+1week", $startDate)))
->with('nextYear', date("Y", strtotime("+1week", $startDate)))
->with('nextYear', date("Y", strtotime("+1week thursday", $startDate)))
->with('prevWeek', date("W", strtotime("-1week", $startDate)))
->with('prevYear', date("Y", strtotime("-1week", $startDate)))
->with('prevYear', date("Y", strtotime("-1week thursday", $startDate)))
->with('highlightId', $highlightId);
}

Expand Down

0 comments on commit 7f81e89

Please sign in to comment.