From a5daabe6523de2678552bd0c7b5b5c85ebecf796 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 22 Sep 2005 13:45:53 +0000 Subject: [PATCH] some cycle improvs git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1128 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-ical/NGiCal/ChangeLog | 5 +++++ sope-ical/NGiCal/Version | 2 +- sope-ical/NGiCal/iCalRecurrenceRule.m | 10 +++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/sope-ical/NGiCal/ChangeLog b/sope-ical/NGiCal/ChangeLog index 1d1f3ae9..c64773b4 100644 --- a/sope-ical/NGiCal/ChangeLog +++ b/sope-ical/NGiCal/ChangeLog @@ -1,3 +1,8 @@ +2005-09-22 Helge Hess + + * iCalRecurrenceRule.m: added direct parser support for 'interval', + allow 'until' values w/o Z marker for date-only values (v4.5.68) + 2005-09-22 Helge Hess * v4.5.67 diff --git a/sope-ical/NGiCal/Version b/sope-ical/NGiCal/Version index ead974b4..59e4f30b 100644 --- a/sope-ical/NGiCal/Version +++ b/sope-ical/NGiCal/Version @@ -2,7 +2,7 @@ MAJOR_VERSION=4 MINOR_VERSION=5 -SUBMINOR_VERSION:=67 +SUBMINOR_VERSION:=68 # 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 a8aaec04..15f6e700 100644 --- a/sope-ical/NGiCal/iCalRecurrenceRule.m +++ b/sope-ical/NGiCal/iCalRecurrenceRule.m @@ -261,6 +261,7 @@ NSString *pByday = nil; NSString *pBymday = nil; NSString *pBysetpos = nil; + NSString *pInterval = nil; props = [_rrule componentsSeparatedByString:@";"]; for (i = 0, count = [props count]; i < count; i++) { @@ -298,6 +299,9 @@ case 'f': if ([key isEqualToString:@"freq"]) { vHolder = &pFrequency; break; } break; + case 'i': + if ([key isEqualToString:@"interval"]) { vHolder = &pInterval; break; } + break; case 'u': if ([key isEqualToString:@"until"]) { vHolder = &pUntil; break; } break; @@ -328,6 +332,10 @@ [self errorWithFormat:@"rrule contains no frequency: '%@'", _rrule]; [pFrequency release]; pFrequency = nil; + if (pInterval != nil) + self->interval = [pInterval intValue]; + [pInterval release]; pInterval = nil; + // TODO: we should parse byday in here if (pByday != nil) [self setByday:pByday]; [pByday release]; pByday = nil; @@ -360,7 +368,7 @@ UTC time format." TODO: we still need some object representing a 'timeless' date. */ - if (![pUntil hasSuffix:@"Z"]) { + if (![pUntil hasSuffix:@"Z"] && [pUntil length] > 8) { [self warnWithFormat:@"'until' date has no explicit UTC marker: '%@'", _rrule]; } -- 2.39.2