<!--
{
  "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/TimeStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV11FormatStyleV04TimeD0V"
  },
  "title" : "Date.FormatStyle.TimeStyle"
}
-->

# Date.FormatStyle.TimeStyle

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

```
struct TimeStyle
```

## Overview

The exact format depends on the locale. Possible time styles include [`omitted`](/documentation/Foundation/Date/FormatStyle/TimeStyle/omitted), [`shortened`](/documentation/Foundation/Date/FormatStyle/TimeStyle/shortened), [`standard`](/documentation/Foundation/Date/FormatStyle/TimeStyle/standard), and [`complete`](/documentation/Foundation/Date/FormatStyle/TimeStyle/complete).

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

```swift
let meetingDate = Date()
meetingDate.formatted(date: .numeric, time: .omitted)
// 10/17/2020
 
meetingDate.formatted(date: .numeric, time: .shortened)
// 10/17/2020, 9:54 PM
 
meetingDate.formatted(date: .numeric, time: .standard)
// 10/17/2020, 9:54:29 PM
 
meetingDate.formatted(date: .numeric, time: .complete)
// 10/17/2020, 9:54:29 PM CDT

meetingDate.formatted()
// 10/17/2020, 9:54 PM
```

The default time style is [`shortened`](/documentation/Foundation/Date/FormatStyle/TimeStyle/shortened).

## Topics

### Modifying a Time Style

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

A time style with all components represented.

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

A time style with no time-related components represented.

[`shortened`](/documentation/Foundation/Date/FormatStyle/TimeStyle/shortened)

A shortened time style with only the hour, minute, and day period components represented.

[`standard`](/documentation/Foundation/Date/FormatStyle/TimeStyle/standard)

A time style with all components except the time zone represented.

### Comparing Time 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)

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

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

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

---

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)