---
title: "init(date:units:)"
framework: clockkit
role: symbol
role_heading: Initializer
path: "clockkit/clkdatetextprovider/init(date:units:)"
---

# init(date:units:)

Creates and returns a text provider with the specified date and the default time zone.

## Declaration

```swift
convenience init(date: Date, units calendarUnits: NSCalendar.Unit)
```

## Parameters

- `date`: The date to display. This parameter must not be nil.
- `calendarUnits`: The units to include in the resulting date string. For a list of supported calendar units, see doc://com.apple.clockkit/documentation/ClockKit/CLKDateTextProvider#Date-Format-Options.

## Return Value

Return Value A text provider initialized with the specified date and time zone information.

## Discussion

Discussion The text provider created by this method uses the default time zone information for the current user. Date values are formatted according to the user’s current locale information.

## See Also

### Creating a Text Provider

- [init(date:units:timeZone:)](clockkit/clkdatetextprovider/init(date:units:timezone:).md)
