---
title: presentation
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/date/relativeformatstyle/presentation-swift.property
---

# presentation

Specifies the style to use when describing a relative date, such as “1 day ago” or “yesterday”.

## Declaration

```swift
var presentation: Date.RelativeFormatStyle.Presentation
```

## Discussion

Discussion Express relative date formats in either numeric or named styles. For example: if let past = Calendar.current.date(byAdding: .day, value: -7, to: Date()) {     var formatStyle = Date.RelativeFormatStyle()          formatStyle.presentation = .numeric     past.formatted(formatStyle) // "1 week ago"          formatStyle.presentation = .named     past.formatted(formatStyle) // "last week" }

## See Also

### Modifying a Relative Date Format Style

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