- (NGCalendarDateRange *)lastInstanceCalendarDateRange {
NSCalendarDate *start, *end;
- start = [self lastInstanceStartDate];
- if (!start)
+ if ((start = [self lastInstanceStartDate]) == nil)
return nil;
+
end = [start addTimeInterval:[self->firstRange duration]];
return [NGCalendarDateRange calendarDateRangeWithStartDate:start
endDate:end];
- (NSCalendarDate *)lastInstanceStartDate {
NSCalendarDate *until;
- /* NOTE: this is horribly inaccurate and doesn't even consider the use
- of repeatCount. It MUST be implemented by subclasses properly! However,
- it does the trick for SOGO 1.0 - that's why it's left here.
+ /*
+ NOTE: this is horribly inaccurate and doesn't even consider the use
+ of repeatCount. It MUST be implemented by subclasses properly!
+ However, it does the trick for SOGo 1.0 - that's why it's left here.
*/
if ((until = [self->rrule untilDate]) != nil)
return until;
+
return nil;
}