mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 03:38:49 +00:00
calendar: fix weekly/monthly calculators when event has no duration
This commit is contained in:
@@ -135,7 +135,8 @@
|
||||
[currentStartDate compare: endDate] == NSOrderedSame)
|
||||
{
|
||||
currentEndDate = [currentStartDate addTimeInterval: [firstRange duration]];
|
||||
if ([startDate compare: currentEndDate] == NSOrderedAscending)
|
||||
if ([startDate compare: currentEndDate] == NSOrderedAscending ||
|
||||
([firstRange duration] == 0 && [startDate compare: currentEndDate] == NSOrderedSame))
|
||||
{
|
||||
NGCalendarDateRange *r;
|
||||
|
||||
|
||||
@@ -216,7 +216,8 @@
|
||||
months: 0
|
||||
days: 0];
|
||||
[start setTimeZone: [firStart timeZone]];
|
||||
if ([start compare: rEnd] == NSOrderedAscending)
|
||||
if ([start compare: rEnd] == NSOrderedAscending ||
|
||||
([firstRange duration] == 0 && [start compare: rEnd] == NSOrderedSame))
|
||||
{
|
||||
end = [start addTimeInterval: [firstRange duration]];
|
||||
r = [NGCalendarDateRange calendarDateRangeWithStartDate: start
|
||||
|
||||
Reference in New Issue
Block a user