diff --git a/app/Http/Controllers/OvertimeTimesheetController.php b/app/Http/Controllers/OvertimeTimesheetController.php index 616f2e06..bf5af6bc 100644 --- a/app/Http/Controllers/OvertimeTimesheetController.php +++ b/app/Http/Controllers/OvertimeTimesheetController.php @@ -18,7 +18,7 @@ public function __invoke(?string $month = null): BinaryFileResponse $this->authorize("manageRequestsAsAdministrativeApprover"); $month = Carbon::canBeCreatedFromFormat($month, "m-Y") - ? Carbon::createFromFormat("m-Y", $month) + ? Carbon::createFromFormat("d-m-Y", "01-$month") : Carbon::now(); $users = User::query() diff --git a/app/Http/Controllers/TimesheetController.php b/app/Http/Controllers/TimesheetController.php index a1956238..8b401339 100644 --- a/app/Http/Controllers/TimesheetController.php +++ b/app/Http/Controllers/TimesheetController.php @@ -20,7 +20,7 @@ public function __invoke(VacationTypeConfigRetriever $configRetriever, ?string $ $this->authorize("manageRequestsAsAdministrativeApprover"); $month = Carbon::canBeCreatedFromFormat($month, "m-Y") - ? Carbon::createFromFormat("m-Y", $month) + ? Carbon::createFromFormat("d-m-Y", "01-$month") : Carbon::now(); $users = User::query() diff --git a/app/Http/Controllers/VacationCalendarController.php b/app/Http/Controllers/VacationCalendarController.php index 0a7e8cb1..f896614b 100644 --- a/app/Http/Controllers/VacationCalendarController.php +++ b/app/Http/Controllers/VacationCalendarController.php @@ -22,7 +22,7 @@ public function index( ?string $month = null, ): Response|RedirectResponse { $month = Carbon::canBeCreatedFromFormat($month, "m-Y") - ? Carbon::createFromFormat("m-Y", $month) + ? Carbon::createFromFormat("d-m-Y", "01-$month") : Carbon::now(); /** @var User $currentUser */