---
title: "init(start:end:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/indatecomponentsrange/init(start:end:)"
---

# init(start:end:)

Initializes the object using the specified start and end dates.

## Declaration

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

## Parameters

- `startDateComponents`: The starting date for the time range assigned to the doc://com.apple.sirikit/documentation/Intents/INDateComponentsRange/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 doc://com.apple.sirikit/documentation/Intents/INDateComponentsRange/endDateComponents property. Specify nil if you want the time range to end in the distant future.

## Return Value

Return Value An initialized INDateComponentsRange object.

## Discussion

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

- [init(start:end:recurrenceRule:)](intents/indatecomponentsrange/init(start:end:recurrencerule:).md)
- [init(ekRecurrenceRule:)](intents/indatecomponentsrange/init(ekrecurrencerule:)-5p7kt.md)
