See ChangeLog.

Monotone-Parent: 41ae9527101a616e7849988930fe0399bf14919f
Monotone-Revision: dd31018a0c1b88afe90d371ba63164a518d02876

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-02-03T16:00:44
maint-2.0.2
Francis Lachapelle 2012-02-03 16:00:44 +00:00
parent 227bcbd57b
commit dfe906cffc
2 changed files with 29 additions and 19 deletions

View File

@ -1,3 +1,10 @@
2012-02-03 Francis Lachapelle <flachapelle@inverse.ca>
* iCalDailyRecurrenceCalculator.m
(-recurrenceRangesWithinCalendarDateRange): handle the case
where the occurrence start date doesn't cover the reference period
but the end date does.
2012-01-11 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2012-01-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* NSString+NGCards.m (-asCardAttributeValues): fixed a leak by * NSString+NGCards.m (-asCardAttributeValues): fixed a leak by

View File

@ -144,26 +144,29 @@
break; break;
} }
if (wrongDay == NO && if (wrongDay == NO)
([startDate compare: currentStartDate] == NSOrderedAscending || {
[startDate compare: currentStartDate] == NSOrderedSame)) currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]];
{ if ([startDate compare: currentStartDate] == NSOrderedAscending ||
NGCalendarDateRange *r; [startDate compare: currentStartDate] == NSOrderedSame ||
[startDate compare: currentEndDate] == NSOrderedAscending)
{
NGCalendarDateRange *r;
if (isFirStart == NO && dayMask && repeatCount == 0) if (isFirStart == NO && dayMask && repeatCount == 0)
{ {
if (![dayMask occursOnDay: [currentStartDate dayOfWeek]]) if (![dayMask occursOnDay: [currentStartDate dayOfWeek]])
wrongDay = YES; wrongDay = YES;
} }
if (isFirStart == YES || wrongDay == NO) if (isFirStart == YES || wrongDay == NO)
{ {
currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]]; r = [NGCalendarDateRange calendarDateRangeWithStartDate: currentStartDate
r = [NGCalendarDateRange calendarDateRangeWithStartDate: currentStartDate endDate: currentEndDate];
endDate: currentEndDate]; if ([_r containsDateRange: r] || [_r doesIntersectWithDateRange: r])
if ([_r containsDateRange: r] || [_r doesIntersectWithDateRange: r]) [ranges addObject: r];
[ranges addObject: r]; }
} }
} }
currentStartDate = [firStart dateByAddingYears: 0 months: 0 currentStartDate = [firStart dateByAddingYears: 0 months: 0