---
title: Date.FormatStyle.Symbol.Quarter
framework: foundation
role: symbol
role_heading: Structure
path: foundation/date/formatstyle/symbol/quarter
---

# Date.FormatStyle.Symbol.Quarter

A type that specifies the format for the quarter in a date format style.

## Declaration

```swift
struct Quarter
```

## Overview

Overview The type Date.FormatStyle.Symbol.Quarter includes static factory variables that create custom Date.FormatStyle.Symbol.Quarter objects:  |   |   |   |   |   |  To customize the month format in a string representation of a Date, use quarter(_:). The following example shows a variety of Date.FormatStyle.Symbol.Quarter format styles applied to a date. let meetingDate = Date() // Oct 7, 2020 at 3:00 PM meetingDate.formatted(Date.FormatStyle().quarter(.abbreviated)) // Q4 meetingDate.formatted(Date.FormatStyle().quarter(.narrow)) // 4th quarter meetingDate.formatted(Date.FormatStyle().quarter(.oneDigit)) // 4 meetingDate.formatted(Date.FormatStyle().quarter(.twoDigits)) // 04 meetingDate.formatted(Date.FormatStyle().quarter(.wide)) // 4th quarter meetingDate.formatted(Date.FormatStyle().quarter()) // Q4

If no format is specified as a parameter, the abbreviated static variable is the default format. For more information about formatting dates, see the Date.FormatStyle.

## Topics

### Modifying a Quarter

- [abbreviated](foundation/date/formatstyle/symbol/quarter/abbreviated.md)
- [narrow](foundation/date/formatstyle/symbol/quarter/narrow.md)
- [oneDigit](foundation/date/formatstyle/symbol/quarter/onedigit.md)
- [twoDigits](foundation/date/formatstyle/symbol/quarter/twodigits.md)
- [wide](foundation/date/formatstyle/symbol/quarter/wide.md)

### Comparing Quarters

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

### Type Properties

- [omitted](foundation/date/formatstyle/symbol/quarter/omitted.md)

## Relationships

### Conforms To

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

## See Also

### Modifying Date Style Format Symbols

- [Date.FormatStyle.Symbol.CyclicYear](foundation/date/formatstyle/symbol/cyclicyear.md)
- [Date.FormatStyle.Symbol.Day](foundation/date/formatstyle/symbol/day.md)
- [Date.FormatStyle.Symbol.DayOfYear](foundation/date/formatstyle/symbol/dayofyear.md)
- [Date.FormatStyle.Symbol.DayPeriod](foundation/date/formatstyle/symbol/dayperiod.md)
- [Date.FormatStyle.Symbol.Era](foundation/date/formatstyle/symbol/era.md)
- [Date.FormatStyle.Symbol.Hour](foundation/date/formatstyle/symbol/hour.md)
- [Date.FormatStyle.Symbol.Minute](foundation/date/formatstyle/symbol/minute.md)
- [Date.FormatStyle.Symbol.Month](foundation/date/formatstyle/symbol/month.md)
- [Date.FormatStyle.Symbol.Second](foundation/date/formatstyle/symbol/second.md)
- [Date.FormatStyle.Symbol.SecondFraction](foundation/date/formatstyle/symbol/secondfraction.md)
- [Date.FormatStyle.Symbol.StandaloneMonth](foundation/date/formatstyle/symbol/standalonemonth.md)
- [Date.FormatStyle.Symbol.StandaloneQuarter](foundation/date/formatstyle/symbol/standalonequarter.md)
- [Date.FormatStyle.Symbol.StandaloneWeekday](foundation/date/formatstyle/symbol/standaloneweekday.md)
- [Date.FormatStyle.Symbol.TimeZone](foundation/date/formatstyle/symbol/timezone.md)
- [Date.FormatStyle.Symbol.VerbatimHour](foundation/date/formatstyle/symbol/verbatimhour.md)
