---
title: Date.FormatStyle.TimeStyle
framework: foundation
role: symbol
role_heading: Structure
path: foundation/date/formatstyle/timestyle
---

# Date.FormatStyle.TimeStyle

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

## Declaration

```swift
struct TimeStyle
```

## Overview

Overview The exact format depends on the locale. Possible time styles include omitted, shortened, standard, and complete. The following code sample shows a variety of time style format results using the en_US locale. 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.

## Topics

### Modifying a Time Style

- [complete](foundation/date/formatstyle/timestyle/complete.md)
- [omitted](foundation/date/formatstyle/timestyle/omitted.md)
- [shortened](foundation/date/formatstyle/timestyle/shortened.md)
- [standard](foundation/date/formatstyle/timestyle/standard.md)

### Comparing Time Styles

- [==(_:_:)](foundation/date/==(_:_:).md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Specifying the Time Format

- [hour(_:)](foundation/date/formatstyle/hour(_:).md)
- [minute(_:)](foundation/date/formatstyle/minute(_:).md)
- [second(_:)](foundation/date/formatstyle/second(_:).md)
- [secondFraction(_:)](foundation/date/formatstyle/secondfraction(_:).md)
- [timeZone(_:)](foundation/date/formatstyle/timezone(_:).md)
