predicateForCompletedReminders(withCompletionDateStarting:ending:calendars:)
Creates a predicate to identify all completed reminders that occur within a given date range.
Declaration
func predicateForCompletedReminders(withCompletionDateStarting startDate: Date?, ending endDate: Date?, calendars: [EKCalendar]?) -> NSPredicateParameters
- startDate:
The start date of the range of reminders fetched, or
nilfor all completed reminders beforeendDate. - endDate:
The end date of the range of reminders fetched, or
nilfor all completed reminders afterstartDate. - calendars:
An array of calendars to search.
Mentioned in
Return Value
A predicate to use when calling fetchReminders(matching:completion:).
Discussion
Pass nil for both startDate and endDate to get all complete reminders in the specified calendars.