Fix condition in weekly recurrence calculator

This commit is contained in:
Francis Lachapelle
2016-11-03 15:26:38 -04:00
parent 70f5d748f2
commit e6b129c8eb
3 changed files with 6 additions and 6 deletions
@@ -125,16 +125,16 @@
while ([currentStartDate compare: endDate] == NSOrderedAscending ||
[currentStartDate compare: endDate] == NSOrderedSame)
{
currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]];
if ([startDate compare: currentStartDate] == NSOrderedAscending ||
[startDate compare: currentStartDate] == NSOrderedSame)
[startDate compare: currentStartDate] == NSOrderedSame ||
[startDate compare: currentEndDate] == NSOrderedAscending)
{
NGCalendarDateRange *r;
currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]];
r = [NGCalendarDateRange calendarDateRangeWithStartDate: currentStartDate
endDate: currentEndDate];
if ([_r containsDateRange: r])
[ranges addObject: r];
[ranges addObject: r];
}
i++;
currentStartDate = [firStart dateByAddingYears: 0