Is it possible that the function:
predicateForEventsWithStartDate(startDate: NSDate, endDate: NSDate, calendars:[EKCalendar])
is not working as described in the documentation!? The enddate seems to work as expected, taking into account the day and the time of the date. But when retrieving the events for the predicate, events being on the startdate X (and later than the time of the start date) are never fetched. As soon as I set the startdate to 23:59 the previous day of X, all events of day X are fetched as expected.
Has anybody experienced this behaviour? Or is the documentation not correct and this is the expected behavoir?
Note: Tried on Iphone 6(iOS8) / Ipad mini 3(iOS8) / iPhone 5 (iOS 9)
EDIT: here is the documentiation of the method:
func predicateForEventsWithStartDate(_ startDate: NSDate,
endDate endDate: NSDate,
calendars calendars: [EKCalendar]?) -> NSPredicate
Creates and returns a predicate for finding events in the event store that fall within a given date range.
startDate
The start date of the range of events fetched.
endDate The end date of the range of events fetched.
calendars
The calendars to search, as an array of EKCalendar objects. Passing nil indicates to search all calendars.