Contents

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 assigned to the Startdatecomponents property. Specify nil if you want the time range to start in the distant past.

  • endDateComponents:

    The ending date for the time range 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 a date range with specific parameters. In a date components object, include only the values you want to specify, such as a range that measures only in days or a range that measures only in minutes.

See Also

Initializing a Date Components Range