From: helge Date: Tue, 14 Nov 2006 12:46:45 +0000 (+0000) Subject: improved rrule parsing X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=052e6f4077001ae1c4ad596758d1a5e08393a445;p=sope improved rrule parsing git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1379 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index 9a889262..64d6b937 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,8 @@ +2006-11-14 Helge Hess + + * iCalRecurrenceRule.m: parse (but not process or store) 'bymonth' + rrules (v4.5.77) + 2006-08-03 Helge Hess * NGVCardSaxHandler.m: fixed a bug with returning parsing results. diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index dbc6c2d3..9e6d7a2f 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,7 +2,7 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=76 +SUBMINOR_VERSION:=77 # v4.5.40 requires NGExtensions v4.5.145 # v4.5.37 requires NGExtensions v4.5.140 diff --git a/sope-ical/NGiCal/iCalRecurrenceRule.m b/sope-ical/NGiCal/iCalRecurrenceRule.m index 5c128399..84d4eb97 100644 --- a/sope-ical/NGiCal/iCalRecurrenceRule.m +++ b/sope-ical/NGiCal/iCalRecurrenceRule.m @@ -82,8 +82,8 @@ - (void)dealloc { [self->byMonthDay release]; - [self->untilDate release]; - [self->rrule release]; + [self->untilDate release]; + [self->rrule release]; [super dealloc]; } @@ -261,6 +261,7 @@ NSString *pCount = nil; NSString *pByday = nil; NSString *pBymday = nil; + NSString *pBymonth = nil; NSString *pBysetpos = nil; NSString *pInterval = nil; @@ -293,6 +294,7 @@ if ([key isEqualToString:@"byday"]) { vHolder = &pByday; break; } if ([key isEqualToString:@"bymonthday"]) { vHolder = &pBymday; break; } if ([key isEqualToString:@"bysetpos"]) { vHolder = &pBysetpos; break; } + if ([key isEqualToString:@"bymonth"]) { vHolder = &pBymonth; break; } break; case 'c': if ([key isEqualToString:@"count"]) { vHolder = &pCount; break; } @@ -340,7 +342,19 @@ // TODO: we should parse byday in here if (pByday != nil) [self setByday:pByday]; [pByday release]; pByday = nil; - + + // TODO: we should process bymonth here + if (pBymonth != nil) { + /* eg this is used in Sunbird 0.3 timezone descriptions */ + static BOOL didWarn = NO; + if (!didWarn) { + [self warnWithFormat: + @"not yet processing 'bymonth' fields of rrules: %@", _rrule]; + didWarn = YES; + } + [pBymonth release]; pBymonth = nil; + } + if (pBymday != nil) { NSArray *t;