(fix) enhance display of all-day invitations (fixes #4145)

This commit is contained in:
Ludovic Marcotte
2017-04-12 16:13:40 -04:00
parent f28b7f2f8c
commit 43385ce5bf
4 changed files with 38 additions and 14 deletions
+8 -10
View File
@@ -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