---
title: capitalizationContext
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/date/relativeformatstyle/capitalizationcontext
---

# capitalizationContext

The capitalization context to use when formatting the relative dates.

## Declaration

```swift
var capitalizationContext: FormatStyleCapitalizationContext
```

## Discussion

Discussion Setting the capitalization context to beginningOfSentence sets the first word of the relative date string to upper-case. A capitalization context set to middleOfSentence keeps all words in the string lower-cased. If you set this property to nil, the format style resets to using unknown.

## See Also

### Modifying a Relative Date Format Style

- [presentation](foundation/date/relativeformatstyle/presentation-swift.property.md)
- [unitsStyle](foundation/date/relativeformatstyle/unitsstyle-swift.property.md)
- [calendar](foundation/date/relativeformatstyle/calendar.md)
- [locale](foundation/date/relativeformatstyle/locale.md)
- [locale(_:)](foundation/date/relativeformatstyle/locale(_:).md)
