I am using predicateForEventsWithStartDate:endDate:calendars
to find all the events that happen in a given 24 hour period. I want all events where any part of the event takes place on this day. I'm struggling to handle events that span multiple days - i.e. start at 10pm and finish at 2am the 'next' day.
The predicate query seems to only consider the start dates of calendar events when carrying out the search. It shows me events that started during my specified time (and ended afterwards), but not events that began before the time period, but then leaked into it.
I could just set the start date earlier and then remove events that end before today begins.
The Apple Docs are not particularly insightful:
(NSPredicate *)predicateForEventsWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate calendars:(NSArray *)calendars
startDate: // The start date of the range of events fetched.
endDate: // The end date of the range of events fetched.