From e79b01ebd1d673379b3ac88e0ab7052a122f39a3 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 18 Oct 2021 14:09:43 -0400 Subject: [PATCH] fix(calendar): fix weekly calculator when event has no duration --- SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m b/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m index 29cf92724..e3786ba7a 100644 --- a/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m +++ b/SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m @@ -163,7 +163,8 @@ currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]]; if (hasRepeatCount || - [startDate compare: currentEndDate] == NSOrderedAscending) + [startDate compare: currentEndDate] == NSOrderedAscending || + ([startDate compare: currentEndDate] == NSOrderedSame && [firstRange duration] == 0)) { // If the rule count is defined, stop once the count is reached. if ([currentStartDate compare: firStart] == NSOrderedSame)