init(start:end:recurrenceRule:)
Initializes the date range to a repeating time period.
Declaration
init(start startDateComponents: DateComponents?, end endDateComponents: DateComponents?, recurrenceRule: INRecurrenceRule?)Parameters
- startDateComponents:
The starting date for the time range. This value is assigned to the Startdatecomponents property. Specify
nilif you want the time range to start in the distant past. - endDateComponents:
The starting date for the time range. This value is assigned to the Enddatecomponents property. Specify
nilif you want the time range to end in the distant future. - recurrenceRule:
The recurrence rule to use when repeating the date range.
Return Value
An initialized INDateComponentsRange object.
Discussion
Use this method to initialize a date range that repeats over time. For example, you could create a range that represents the time range of “every wednesday”. Use the start and end dates to specify the date and time values that you want to repeat and use the recurrenceRule property to establish the conditions for repeating the value.