<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RelevanceKit",
  "identifier" : "/documentation/RelevanceKit/RelevantContext/date(range:kind:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RelevanceKit"
    ],
    "preciseIdentifier" : "s:12RelevanceKit15RelevantContextV4date5range4kindACSNy10Foundation4DateVG_AC0I4KindVtFZ"
  },
  "title" : "date(range:kind:)"
}
-->

# date(range:kind:)

Tells the system a widget is relevant for a known date range and provides an additional contextual hint.

```
static func date(range: ClosedRange<Date>, kind: RelevantContext.DateKind) -> RelevantContext
```

## Parameters

`range`

The exact time and duration a widget is most relevant.

`kind`

An additional contextual hint that helps the system determine the widget’s relevance.

## Return Value

A contextual clue that the system uses to determine the relevance of a widget in the Smart Stack on Apple Watch.

## Discussion> Note: Smart Stacks are available in iOS, iPadOS, and watchOS. However, functionality provided by RelevanceKit API is only available
> in watchOS. Calling its API on other platforms doesn’t have any effect.
> For more information, refer to <doc://com.apple.documentation/documentation/WidgetKit/Widget-Suggestions-In-Smart-Stacks>.

---

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)