<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Date/FormatStyle/DateStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV11FormatStyleV0bD0V"
  },
  "title" : "Date.FormatStyle.DateStyle"
}
-->

# Date.FormatStyle.DateStyle

Type that defines date styles varied in length or components included.

```
struct DateStyle
```

## Overview

The exact format depends on the locale. Possible values of date style include [`omitted`](/documentation/Foundation/Date/FormatStyle/DateStyle/omitted), [`numeric`](/documentation/Foundation/Date/FormatStyle/DateStyle/numeric), [`abbreviated`](/documentation/Foundation/Date/FormatStyle/DateStyle/abbreviated), [`long`](/documentation/Foundation/Date/FormatStyle/DateStyle/long), and [`complete`](/documentation/Foundation/Date/FormatStyle/DateStyle/complete).

The following code sample shows a variety of date style format results using the `en_US` locale.

```swift
let meetingDate = Date()
meetingDate.formatted(date: .omitted, time: .standard) 
// 9:42:14 AM

meetingDate.formatted(date: .numeric, time: .omitted) 
// 10/17/2020

meetingDate.formatted(date: .abbreviated, time: .omitted)
// Oct 17, 2020

meetingDate.formatted(date: .long, time: .omitted) 
// October 17, 2020

meetingDate.formatted(date: .complete, time: .omitted) 
// Saturday, October 17, 2020

meetingDate.formatted()
// 10/17/2020, 9:42 AM
```

The default date style is `numeric`.

## Topics

### Modifying a Date Style

[`abbreviated`](/documentation/Foundation/Date/FormatStyle/DateStyle/abbreviated)

A date style with some components abbreviated for space-constrained applications.

[`complete`](/documentation/Foundation/Date/FormatStyle/DateStyle/complete)

A date style with all components represented.

[`long`](/documentation/Foundation/Date/FormatStyle/DateStyle/long)

A lengthened date style with the full month, day of month, and year components represented.

[`numeric`](/documentation/Foundation/Date/FormatStyle/DateStyle/numeric)

A date style with the month, day of month, and year components represented as numeric values.

[`omitted`](/documentation/Foundation/Date/FormatStyle/DateStyle/omitted)

A date style with no date-related components represented.

### Comparing Date Styles

[`==(_:_:)`](/documentation/Foundation/Date/==(_:_:))

Returns true if the two `Date` values represent the same point in time.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Decodable`](/documentation/Swift/Decodable)

[`Encodable`](/documentation/Swift/Encodable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)