fix(calendar): fix first range of "busy off hours" in vFreeBusy response
parent
989021d561
commit
5e1f487e49
|
@ -372,10 +372,23 @@
|
||||||
if ([endDate compare: currentEndDate] == NSOrderedAscending)
|
if ([endDate compare: currentEndDate] == NSOrderedAscending)
|
||||||
currentEndDate = endDate;
|
currentEndDate = endDate;
|
||||||
|
|
||||||
|
if ([currentStartDate compare: startDate] == NSOrderedAscending)
|
||||||
|
{
|
||||||
|
if ([startDate compare: currentEndDate] == NSOrderedAscending)
|
||||||
|
{
|
||||||
[infos addObject: [NSDictionary dictionaryWithObjectsAndKeys:
|
[infos addObject: [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
[NSNumber numberWithBool: YES], @"c_isopaque",
|
[NSNumber numberWithBool: YES], @"c_isopaque",
|
||||||
([currentStartDate compare: startDate] == NSOrderedAscending)? startDate : currentStartDate, @"startDate",
|
startDate, @"startDate",
|
||||||
currentEndDate, @"endDate", nil]];
|
currentEndDate, @"endDate", nil]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[infos addObject: [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
|
[NSNumber numberWithBool: YES], @"c_isopaque",
|
||||||
|
currentStartDate, @"startDate",
|
||||||
|
currentEndDate, @"endDate", nil]];
|
||||||
|
}
|
||||||
|
|
||||||
if (currentEndDate != endDate
|
if (currentEndDate != endDate
|
||||||
&& ([currentEndDate dayOfWeek] == 6 || [currentEndDate dayOfWeek] == 0))
|
&& ([currentEndDate dayOfWeek] == 6 || [currentEndDate dayOfWeek] == 0))
|
||||||
|
|
Loading…
Reference in New Issue