Monotone-Parent: dd34ff3c83585062bafd5221403d042c9a83d6ea

Monotone-Revision: 4237da1c46aa8fc93100964f3c0b79c40b83ea1b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-07-03T15:18:44
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-07-03 15:18:44 +00:00
parent 5fbc2ed387
commit 8d7bb2a170
2 changed files with 21 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2008-07-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalEvent.m ([iCalEvent -endDate]): if no DTEND is specified,
returns the end date based on the start date and take the duration
into account if it is specified.
2008-06-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalFreeBusy.m ([iCalFreeBusy

View File

@@ -68,8 +68,21 @@
- (NSCalendarDate *) endDate
{
return [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
dateTime];
NSCalendarDate *endDate;
NSString *duration;
endDate = [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"]
dateTime];
if (!endDate)
{
endDate = [self startDate];
duration = [self duration];
if ([duration length])
endDate
= [endDate addTimeInterval: [duration durationAsTimeInterval]];
}
return endDate;
}
- (BOOL) hasEndDate