id currentDay;
/* individual values */
- NSCalendarDate *startDate;
- NSCalendarDate *endDate;
+ id startDateHour;
+ id startDateMinute;
+ id startDateDay;
+ id startDateMonth;
+ id startDateYear;
+
+ id endDateHour;
+ id endDateMinute;
+ id endDateDay;
+ id endDateMonth;
+ id endDateYear;
+
NSArray *participants; /* array of iCalPerson's */
NSArray *resources; /* array of iCalPerson's */
id duration;
@implementation UIxAppointmentProposal
- (void)dealloc {
- [self->duration release];
- [self->startDate release];
- [self->endDate release];
- [self->participants release];
- [self->resources release];
+ [self->startDateHour release];
+ [self->startDateMinute release];
+ [self->startDateDay release];
+ [self->startDateMonth release];
+ [self->startDateYear release];
+
+ [self->endDateHour release];
+ [self->endDateMinute release];
+ [self->endDateDay release];
+ [self->endDateMonth release];
+ [self->endDateYear release];
+ [self->duration release];
+
+ [self->participants release];
+ [self->resources release];
[super dealloc];
}
return self->item;
}
+- (void)setStartDateHour:(id)_startDateHour {
+ ASSIGN(self->startDateHour, _startDateHour);
+}
+- (id)startDateHour {
+ return self->startDateHour;
+}
+- (void)setStartDateMinute:(id)_startDateMinute {
+ ASSIGN(self->startDateMinute, _startDateMinute);
+}
+- (id)startDateMinute {
+ return self->startDateMinute;
+}
+- (void)setStartDateDay:(id)_startDateDay {
+ ASSIGN(self->startDateDay, _startDateDay);
+}
+- (id)startDateDay {
+ return self->startDateDay;
+}
+- (void)setStartDateMonth:(id)_startDateMonth {
+ ASSIGN(self->startDateMonth, _startDateMonth);
+}
+- (id)startDateMonth {
+ return self->startDateMonth;
+}
+- (void)setStartDateYear:(id)_startDateYear {
+ ASSIGN(self->startDateYear, _startDateYear);
+}
+- (id)startDateYear {
+ return self->startDateYear;
+}
+- (void)setEndDateHour:(id)_endDateHour {
+ ASSIGN(self->endDateHour, _endDateHour);
+}
+- (id)endDateHour {
+ return self->endDateHour;
+}
+- (void)setEndDateMinute:(id)_endDateMinute {
+ ASSIGN(self->endDateMinute, _endDateMinute);
+}
+- (id)endDateMinute {
+ return self->endDateMinute;
+}
+- (void)setEndDateDay:(id)_endDateDay {
+ ASSIGN(self->endDateDay, _endDateDay);
+}
+- (id)endDateDay {
+ return self->endDateDay;
+}
+- (void)setEndDateMonth:(id)_endDateMonth {
+ ASSIGN(self->endDateMonth, _endDateMonth);
+}
+- (id)endDateMonth {
+ return self->endDateMonth;
+}
+- (void)setEndDateYear:(id)_endDateYear {
+ ASSIGN(self->endDateYear, _endDateYear);
+}
+- (id)endDateYear {
+ return self->endDateYear;
+}
+
- (void)setStartDate:(NSCalendarDate *)_date {
- ASSIGN(self->startDate, _date);
+ [self setStartDateHour:[NSNumber numberWithInt:[_date hourOfDay]]];
+ [self setStartDateMinute:[NSNumber numberWithInt:[_date minuteOfHour]]];
+ [self setStartDateDay:[NSNumber numberWithInt:[_date dayOfMonth]]];
+ [self setStartDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]];
+ [self setStartDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
}
- (NSCalendarDate *)startDate {
- return self->startDate;
+ return [NSCalendarDate dateWithYear:[[self startDateYear] intValue]
+ month:[[self startDateMonth] intValue]
+ day:[[self startDateDay] intValue]
+ hour:[[self startDateHour] intValue]
+ minute:[[self startDateMinute] intValue]
+ second:0
+ timeZone:[self viewTimeZone]];
}
- (void)setEndDate:(NSCalendarDate *)_date {
- ASSIGN(self->endDate, _date);
+ [self setEndDateHour:[NSNumber numberWithInt:[_date hourOfDay]]];
+ [self setEndDateMinute:[NSNumber numberWithInt:[_date minuteOfHour]]];
+ [self setEndDateDay:[NSNumber numberWithInt:[_date dayOfMonth]]];
+ [self setEndDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]];
+ [self setEndDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]];
}
- (NSCalendarDate *)endDate {
- return self->endDate;
+ return [NSCalendarDate dateWithYear:[[self endDateYear] intValue]
+ month:[[self endDateMonth] intValue]
+ day:[[self endDateDay] intValue]
+ hour:[[self endDateHour] intValue]
+ minute:[[self endDateMinute] intValue]
+ second:59
+ timeZone:[self viewTimeZone]];
}
- (void)setDuration:(id)_duration {