---
title: Date.ComponentsFormatStyle
framework: foundation
role: symbol
role_heading: Structure
path: foundation/date/componentsformatstyle
---

# Date.ComponentsFormatStyle

A style for formatting a date interval in terms of specific date components.

## Declaration

```swift
struct ComponentsFormatStyle
```

## Topics

### Structures

- [Date.ComponentsFormatStyle.Field](foundation/date/componentsformatstyle/field.md)
- [Date.ComponentsFormatStyle.Style](foundation/date/componentsformatstyle/style-swift.struct.md)

### Initializers

- [init(style:locale:calendar:fields:)](foundation/date/componentsformatstyle/init(style:locale:calendar:fields:).md)

### Instance Properties

- [calendar](foundation/date/componentsformatstyle/calendar.md)
- [fields](foundation/date/componentsformatstyle/fields.md)
- [isPositive](foundation/date/componentsformatstyle/ispositive.md)
- [locale](foundation/date/componentsformatstyle/locale.md)
- [style](foundation/date/componentsformatstyle/style-swift.property.md)

### Instance Methods

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

### Default Implementations

- [DiscreteFormatStyle Implementations](foundation/date/componentsformatstyle/discreteformatstyle-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Decodable](swift/decodable.md)
- [DiscreteFormatStyle](foundation/discreteformatstyle.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [FormatStyle](foundation/formatstyle.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Applying date and time styles

- [dateTime](foundation/formatstyle/datetime.md)
- [Date.FormatStyle](foundation/date/formatstyle.md)
- [Date.ISO8601FormatStyle](foundation/date/iso8601formatstyle.md)
- [verbatim(_:locale:timeZone:calendar:)](foundation/formatstyle/verbatim(_:locale:timezone:calendar:).md)
- [Date.VerbatimFormatStyle](foundation/date/verbatimformatstyle.md)
- [interval](foundation/formatstyle/interval.md)
- [Date.IntervalFormatStyle](foundation/date/intervalformatstyle.md)
- [relative(presentation:unitsStyle:)](foundation/formatstyle/relative(presentation:unitsstyle:).md)
- [Date.RelativeFormatStyle](foundation/date/relativeformatstyle.md)
- [components(style:fields:)](foundation/formatstyle/components(style:fields:).md)
