2005-09-20 Helge Hess <helge.hess@opengroupware.org>
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)
* iCalRecurrenceCalculator.m: moved cluster subclasses to own source
files (v4.5.63)
MAJOR_VERSION=4
MINOR_VERSION=5
MAJOR_VERSION=4
MINOR_VERSION=5
# v4.5.40 requires NGExtensions v4.5.145
# v4.5.37 requires NGExtensions v4.5.140
# v4.5.40 requires NGExtensions v4.5.145
# v4.5.37 requires NGExtensions v4.5.140
rEnd = [_r endDate];
interval = [self->rrule repeatInterval];
until = [self lastInstanceStartDate];
rEnd = [_r endDate];
interval = [self->rrule repeatInterval];
until = [self lastInstanceStartDate];
+
+ 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)
if ([until compare:rStart] == NSOrderedAscending)
return nil;
if ([until compare:rEnd] == NSOrderedDescending)
- (NGCalendarDateRange *)lastInstanceCalendarDateRange {
NSCalendarDate *start, *end;
- (NGCalendarDateRange *)lastInstanceCalendarDateRange {
NSCalendarDate *start, *end;
- start = [self lastInstanceStartDate];
- if (!start)
+ if ((start = [self lastInstanceStartDate]) == nil)
end = [start addTimeInterval:[self->firstRange duration]];
return [NGCalendarDateRange calendarDateRangeWithStartDate:start
endDate:end];
end = [start addTimeInterval:[self->firstRange duration]];
return [NGCalendarDateRange calendarDateRangeWithStartDate:start
endDate:end];
- (NSCalendarDate *)lastInstanceStartDate {
NSCalendarDate *until;
- (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;
*/
if ((until = [self->rrule untilDate]) != nil)
return until;