Initializer

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 nil if 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 nil if 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.

See Also

Initializing a Date Components Range

init(start: DateComponents?, end: DateComponents?)

Initializes the object using the specified start and end dates.

init(ekRecurrenceRule: EKRecurrenceRule)

Initializes the date range using the specified recurrence rule.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software