X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sope-ical%2FNGiCal%2FiCalRecurrenceCalculator.m;h=6e048f7eff5387fef2cd0bdf2cf9898549da1a3d;hb=37d2db576f8aee5553b0a9773a3008b3f809379a;hp=9d2febd729be97dc54fb69c474ddc40add207943;hpb=36123d033a97586a9516bb52f6083952e50826a8;p=sope diff --git a/sope-ical/NGiCal/iCalRecurrenceCalculator.m b/sope-ical/NGiCal/iCalRecurrenceCalculator.m index 9d2febd7..6e048f7e 100644 --- a/sope-ical/NGiCal/iCalRecurrenceCalculator.m +++ b/sope-ical/NGiCal/iCalRecurrenceCalculator.m @@ -269,9 +269,9 @@ static Class yearlyCalcClass = Nil; - (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]; @@ -280,12 +280,14 @@ static Class yearlyCalcClass = Nil; - (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; }