---
title: Formatter.Context
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/formatter/context
---

# Formatter.Context

The formatting context for a formatter.

## Declaration

```swift
enum Context
```

## Overview

Overview Use formatting contexts to specify where the result of formatting will appear, so that the formatter can provide the most appropriate result. For example, when formatting a date or date symbol for a French locale, you want the month name to be capitalized if it appears at the beginning of the sentence (“Juin est mon mois de naissance”), but not if it appears elsewhere (“Mon mois de naissance est juin”). If the formatting context isn’t known ahead of time, specify Formatter.Context.dynamic to have the system determine the context automatically.

## Topics

### Constants

- [Formatter.Context.unknown](foundation/formatter/context/unknown.md)
- [Formatter.Context.dynamic](foundation/formatter/context/dynamic.md)
- [Formatter.Context.standalone](foundation/formatter/context/standalone.md)
- [Formatter.Context.listItem](foundation/formatter/context/listitem.md)
- [Formatter.Context.beginningOfSentence](foundation/formatter/context/beginningofsentence.md)
- [Formatter.Context.middleOfSentence](foundation/formatter/context/middleofsentence.md)

### Initializers

- [init(rawValue:)](foundation/formatter/context/init(rawvalue:).md)

## Relationships

### Conforms To

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

## See Also

### Constants

- [Formatter.UnitStyle](foundation/formatter/unitstyle.md)
