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

# init(date:style:units:)

Creates a text provider that shows the difference between the current time and the specified date.

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

## Parameters

`date`

The date to use for calculations. This parameter must not be `nil`.

`style`

The style to use when formatting the relative date value. For a list of possible values, see [`CLKRelativeDateStyle`](/documentation/ClockKit/CLKRelativeDateStyle).

`calendarUnits`

The units to include in the resulting date string. For a list of supported calendar units, see [`Date Format Options`](/documentation/ClockKit/CLKRelativeDateTextProvider#Date-Format-Options).

## Discussion

This initializer produces a text provider that updates automatically as time passes. To create a text provider that produces a static, relative date, use [`init(date:relativeTo:style:units:)`](/documentation/ClockKit/CLKRelativeDateTextProvider/init(date:relativeTo:style:units:)) instead.

The text provider created by this method uses the default time zone information for the current user. The system formats date values 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)