2005-09-20 Helge Hess <helge.hess@opengroupware.org>
+ * iCalMonthlyRecurrenceCalculator.m: stop calculation if a byday part
+ was detected in the rule (v4.5.64)
+
* iCalRecurrenceCalculator.m: moved cluster subclasses to own source
files (v4.5.63)
rEnd = [_r endDate];
interval = [self->rrule repeatInterval];
until = [self lastInstanceStartDate];
-
- if (until) {
+
+ if ([self->rrule byDayMask] != 0) {
+ [self errorWithFormat:@"cannot process byday part of rrule: %@",
+ self->rrule];
+ return nil;
+ }
+
+ if (until != nil) {
if ([until compare:rStart] == NSOrderedAscending)
return nil;
if ([until compare:rEnd] == NSOrderedDescending)
- (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;
}