Initializer

init(start:end:)

Initializes the object using the specified start and end dates.

Declaration

convenience init(start startDateComponents: DateComponents?, end endDateComponents: DateComponents?)

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.

Return Value

An initialized INDateComponentsRange object.

Discussion

Use this method to initialize the date range when you want to be specific about which date components you include in the range. With a date components object, you can specify only the values you care about. For example, you could create a range that is measured only in days or a range that is measured only in minutes.

See Also

Initializing a Date Components Range

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