From e441df367dac43d973226a3d9017389bfa4a88cd Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 3 Feb 2021 06:25:58 +0100 Subject: [PATCH] Fix #4338 --- app/Http/Controllers/Json/RecurrenceController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php index cbf6aff8da..451c2a7169 100644 --- a/app/Http/Controllers/Json/RecurrenceController.php +++ b/app/Http/Controllers/Json/RecurrenceController.php @@ -37,8 +37,7 @@ use Log; */ class RecurrenceController extends Controller { - /** @var RecurringRepositoryInterface The recurring repository. */ - private $recurring; + private RecurringRepositoryInterface $recurring; /** * RecurrenceController constructor. @@ -97,12 +96,14 @@ class RecurrenceController extends Controller if ('yearly' === $repetitionType) { $repetitionMoment = explode(',', $request->get('type'))[1] ?? '2018-01-01'; } + $actualStart->startOfDay(); $repetition = new RecurrenceRepetition; $repetition->repetition_type = $repetitionType; $repetition->repetition_moment = $repetitionMoment; $repetition->repetition_skip = (int) $request->get('skip'); $repetition->weekend = (int) $request->get('weekend'); $actualEnd = clone $end; + switch ($endsAt) { default: case 'forever':