From ddc9a1b3f5c7e90ab09f99e63911bdb016bb94df Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 21 Jan 2013 13:43:32 -0500 Subject: [PATCH] Fix recurrence-id of all-day events Recurrence-ID of all-day events must be defined as a date (VALUE=DATE). --- SOPE/NGCards/iCalEntityObject.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SOPE/NGCards/iCalEntityObject.m b/SOPE/NGCards/iCalEntityObject.m index 446eab0ef..b10fb301b 100644 --- a/SOPE/NGCards/iCalEntityObject.m +++ b/SOPE/NGCards/iCalEntityObject.m @@ -29,6 +29,7 @@ #import "iCalAlarm.h" #import "iCalDateTime.h" #import "iCalEntityObject.h" +#import "iCalEvent.h" #import "iCalPerson.h" @interface iCalEntityObject (PrivateAPI) @@ -266,8 +267,13 @@ - (void) setRecurrenceId: (NSCalendarDate *) newRecId { - [(iCalDateTime *) [self uniqueChildWithTag: @"recurrence-id"] - setDateTime: newRecId]; + iCalDateTime* recurrenceId; + + recurrenceId = (iCalDateTime *) [self uniqueChildWithTag: @"recurrence-id"]; + if ([self isKindOfClass: [iCalEvent class]] && [(iCalEvent *)self isAllDay]) + [recurrenceId setDate: newRecId]; + else + [recurrenceId setDateTime: newRecId]; } - (NSCalendarDate *) recurrenceId