Skip to content

Commit

Permalink
fix(calendar): fix weekly calculator when event has no duration
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Oct 18, 2021
1 parent ecbdf45 commit e79b01e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SOPE/NGCards/iCalWeeklyRecurrenceCalculator.m
Expand Up @@ -163,7 +163,8 @@ - (NSArray *) recurrenceRangesWithinCalendarDateRange: (NGCalendarDateRange *) _

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)
Expand Down

0 comments on commit e79b01e

Please sign in to comment.