From 10e7c3fdfcc85fc0f3bce059c480176254713137 Mon Sep 17 00:00:00 2001 From: Tim Lappe Date: Sat, 15 Mar 2025 09:06:01 +0100 Subject: [PATCH] Show events in the past --- src/Controller/CalendarController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/CalendarController.php b/src/Controller/CalendarController.php index fb903ee..90db4d2 100644 --- a/src/Controller/CalendarController.php +++ b/src/Controller/CalendarController.php @@ -50,10 +50,10 @@ final class CalendarController extends AbstractController return new Response('Kein Zugriff', Response::HTTP_FORBIDDEN); } - $startDate = (new DateTime())->format('Y-m-d'); + $startDate = (new DateTime('-1 year'))->format('Y-m-d'); $endDate = (new DateTime('+180 days'))->format('Y-m-d'); - $absences = $this->absenceManager->getAbsencesForUser('tim.lappe@check24.de', new DateTime('-1 day')); + $absences = $this->absenceManager->getAbsencesForUser('tim.lappe@check24.de', new DateTime('-1 year')); $days = $this->calendarService->getAllDays($startDate, $endDate); $days = $this->calendarService->processAbsences($days, $absences); @@ -66,4 +66,4 @@ final class CalendarController extends AbstractController return $response; } -} \ No newline at end of file +} \ No newline at end of file