cache the "startDate"

pull/7/head
Wolfgang Sourdeau 2012-10-30 08:49:02 -04:00
parent 20cb769db1
commit 40a1a51845
2 changed files with 16 additions and 2 deletions

View File

@ -30,6 +30,9 @@
@class iCalRecurrenceRule;
@interface iCalTimeZonePeriod : CardGroup
{
NSCalendarDate *startDate;
}
- (NSCalendarDate *) startDate;
- (iCalRecurrenceRule *) recurrenceRule;

View File

@ -103,10 +103,21 @@
// return dayOfWeek;
// }
- (void) dealloc
{
[startDate release];
[super dealloc];
}
- (NSCalendarDate *) startDate
{
return [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
dateTime];
if (!startDate)
{
startDate = [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"]
dateTime];
[startDate retain];
}
return startDate;
}
- (iCalRecurrenceRule *) recurrenceRule