}
- (NSString *)shortTextForApt {
-#if 1
NSCalendarDate *startDate;
NSString *ms;
[startDate minuteOfHour],
[[self appointment] valueForKey:@"title"]];
return ms;
-#else
- UIxAppointmentFormatter *f;
-
- f = [UIxAppointmentFormatter formatterWithFormat:
- @"%S - %E;\n%T;\n%L;\n%5P;\n%50R"];
- [f setRelationDate:[self referenceDateForFormatter]];
- [f setShowFullNames:[self showFullNames]];
- if([self showAMPMDates])
- [f switchToAMPMTimes:YES];
-
- return [NSString stringWithFormat:@"%@:\n%@",
- [self aptTypeLabel],
- [f stringForObjectValue:self->appointment]];
-#endif
}
- (NSString *)shortTitleForApt {
- NSString *title;
+ NSString *title;
- title = [self->appointment valueForKey:@"title"];
- if([title length] > 12) {
+ title = [self->appointment valueForKey:@"title"];
+ if([title length] > 12) {
title = [NSString stringWithFormat:@"%@...",
[title substringToIndex:11]];
- }
- return title;
+ }
+ return title;
}
- (NSCalendarDate *)referenceDateForFormatter {
- (NSString *)appointmentViewURL {
id pkey;
- if ((pkey = [[self appointment] valueForKey:@"dateId"]) == nil)
+ if ((pkey = [[self appointment] valueForKey:@"uid"]) == nil)
return nil;
return [NSString stringWithFormat:@"%@/view", pkey];