diff --git a/SoObjects/Appointments/English.lproj/Localizable.strings b/SoObjects/Appointments/English.lproj/Localizable.strings index f25897d4a..84f5e5d7d 100644 --- a/SoObjects/Appointments/English.lproj/Localizable.strings +++ b/SoObjects/Appointments/English.lproj/Localizable.strings @@ -18,6 +18,8 @@ vtodo_class2 = "(Confidential task)"; "calendar_label" = "Calendar"; "startDate_label" = "Start"; "endDate_label" = "End"; +"time_label" = "Time"; +"to_label" = "to"; "due_label" = "Due Date"; "location_label" = "Location"; "summary_label" = "Summary"; diff --git a/SoObjects/Appointments/SOGoAptMailNotification.m b/SoObjects/Appointments/SOGoAptMailNotification.m index 4c26191ae..c57c89adb 100644 --- a/SoObjects/Appointments/SOGoAptMailNotification.m +++ b/SoObjects/Appointments/SOGoAptMailNotification.m @@ -27,6 +27,7 @@ #import #import #import +#import #import #import #import @@ -186,6 +187,19 @@ return sentByText; } +- (NSTimeInterval) duration +{ + return [[self newEndDate] timeIntervalSinceDate:[self newStartDate]]; +} + +- (BOOL) isEndDateOnSameDay +{ + if ([[self apt] isAllDay]) + return ([self duration] <= 86400); + + return [[self newStartDate] isDateOnSameDay: [self newEndDate]]; +} + - (NSString *) formattedAptStartDate { NSString *s; diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index b54f452b5..98c8cedfd 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -221,21 +221,19 @@ return [[self dateFormatter] formattedTime: [self endCalendarDate]]; } -- (BOOL) isEndDateOnSameDay -{ - NSCalendarDate *aDate; - if ([[self inEvent] isAllDay]) - aDate = [[self endCalendarDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1]; - else - aDate = [self endCalendarDate]; - return [[self startCalendarDate] isDateOnSameDay: aDate]; -} - - (NSTimeInterval) duration { return [[self endCalendarDate] timeIntervalSinceDate:[self startCalendarDate]]; } +- (BOOL) isEndDateOnSameDay +{ + if ([[self inEvent] isAllDay]) + return [self duration] <= 86400; + + return [[self startCalendarDate] isDateOnSameDay: [self endCalendarDate]]; +} + /* calendar folder support */ - (SOGoAppointmentFolder *) calendarFolder diff --git a/UI/Templates/Appointments/SOGoAptMailInvitation.wox b/UI/Templates/Appointments/SOGoAptMailInvitation.wox index 1abc71423..a389986c1 100644 --- a/UI/Templates/Appointments/SOGoAptMailInvitation.wox +++ b/UI/Templates/Appointments/SOGoAptMailInvitation.wox @@ -23,10 +23,19 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon > - + + + - + + + + + + + + - @@ -36,7 +45,8 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon - - + +