Fix for bug #3166
Monotone-Parent: d85d7d8fee328504d17e9458ec53c9819d09b3bc Monotone-Revision: bc0e93dcef9a5cd587d3be1a69b22cdf040ed789 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-12-12T18:43:14 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
376a681d94
commit
ee3c7fe50f
|
@ -138,7 +138,7 @@
|
||||||
|
|
||||||
lastInstanceStartDate = [firStart dateByAddingYears: 0 months: 0
|
lastInstanceStartDate = [firStart dateByAddingYears: 0 months: 0
|
||||||
days: ([rrule repeatInterval]
|
days: ([rrule repeatInterval]
|
||||||
* [rrule repeatCount])];
|
* ([rrule repeatCount] - 1))];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lastInstanceStartDate = [super lastInstanceStartDate];
|
lastInstanceStartDate = [super lastInstanceStartDate];
|
||||||
|
|
|
@ -494,7 +494,7 @@ static void NGMonthDaySet_fillWithByDayX (NGMonthDaySet *daySet,
|
||||||
|
|
||||||
lastInstanceStartDate = [firStart dateByAddingYears: 0
|
lastInstanceStartDate = [firStart dateByAddingYears: 0
|
||||||
months: ([rrule repeatInterval]
|
months: ([rrule repeatInterval]
|
||||||
* [rrule repeatCount])
|
* ([rrule repeatCount] - 1))
|
||||||
days: 0];
|
days: 0];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
|
|
||||||
lastInstanceStartDate = [firStart dateByAddingYears: 0 months: 0
|
lastInstanceStartDate = [firStart dateByAddingYears: 0 months: 0
|
||||||
days: (7 * [rrule repeatInterval]
|
days: (7 * [rrule repeatInterval]
|
||||||
* [rrule repeatCount])];
|
* ([rrule repeatCount] - 1))];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lastInstanceStartDate = [super lastInstanceStartDate];
|
lastInstanceStartDate = [super lastInstanceStartDate];
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
|
|
||||||
lastInstanceStartDate
|
lastInstanceStartDate
|
||||||
= [firStart dateByAddingYears: ([rrule repeatInterval]
|
= [firStart dateByAddingYears: ([rrule repeatInterval]
|
||||||
* [rrule repeatCount])
|
* ([rrule repeatCount] - 1))
|
||||||
months: 0
|
months: 0
|
||||||
days: 0];
|
days: 0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,15 +40,18 @@
|
||||||
|
|
||||||
- (BOOL) isStillRelevant
|
- (BOOL) isStillRelevant
|
||||||
{
|
{
|
||||||
NSCalendarDate *now;
|
NSCalendarDate *now, *lastRecurrence;
|
||||||
BOOL isStillRelevent;
|
BOOL isStillRelevent;
|
||||||
|
|
||||||
now = [NSCalendarDate calendarDate];
|
now = [NSCalendarDate calendarDate];
|
||||||
|
|
||||||
if ([self isRecurrent])
|
if ([self isRecurrent])
|
||||||
isStillRelevent = ([[self lastPossibleRecurrenceStartDate] earlierDate: now] == now);
|
{
|
||||||
|
lastRecurrence = [self lastPossibleRecurrenceStartDate];
|
||||||
|
isStillRelevent = (lastRecurrence == nil || [lastRecurrence earlierDate: now] == now);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
isStillRelevent = ([[self endDate] earlierDate: now] == now);
|
isStillRelevent = ([[self endDate] earlierDate: now] == now);
|
||||||
|
|
||||||
return isStillRelevent;
|
return isStillRelevent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue