<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Text/DateStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4TextV9DateStyleV"
  },
  "title" : "Text.DateStyle"
}
-->

# Text.DateStyle

A predefined style used to display a `Date`.

```
struct DateStyle
```

## Topics

### Getting text date styles

[`date`](/documentation/SwiftUI/Text/DateStyle/date)

A style displaying a date.

[`offset`](/documentation/SwiftUI/Text/DateStyle/offset)

A style displaying a date as offset from now.

[`relative`](/documentation/SwiftUI/Text/DateStyle/relative)

A style displaying a date as relative to now.

[`time`](/documentation/SwiftUI/Text/DateStyle/time)

A style displaying only the time component for a date.

[`timer`](/documentation/SwiftUI/Text/DateStyle/timer)

A style displaying a date as timer counting from now.



---

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)