<!--
{
  "availability" : [
    "watchOS: 2.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ClockKit",
  "identifier" : "/documentation/ClockKit/CLKDateTextProvider/init(date:units:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "ClockKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CLKDateTextProvider(cm)textProviderWithDate:units:"
  },
  "title" : "init(date:units:)"
}
-->

# init(date:units:)

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

```
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 [`Date Format Options`](/documentation/ClockKit/CLKDateTextProvider#Date-Format-Options).

## Return Value

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

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)