---
title: "date(range:kind:)"
framework: relevancekit
role: symbol
role_heading: Type Method
path: "relevancekit/relevantcontext/date(range:kind:)"
---

# date(range:kind:)

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

## Declaration

```swift
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

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

## Discussion

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 Increasing the visibility of widgets in Smart Stacks.

## See Also

### Time clues

- [date(_:)](relevancekit/relevantcontext/date(_:).md)
- [date(_:kind:)](relevancekit/relevantcontext/date(_:kind:).md)
- [date(interval:kind:)](relevancekit/relevantcontext/date(interval:kind:).md)
- [RelevantContext.DateKind](relevancekit/relevantcontext/datekind.md)
- [date(from:to:)](relevancekit/relevantcontext/date(from:to:).md)
