---
title: "era(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/date/formatstyle/attributed-swift.struct/era(_:)"
---

# era(_:)

Change the representation of the era in the format.

## Declaration

```swift
func era(_ format: Date.FormatStyle.Symbol.Era = .abbreviated) -> Date.FormatStyle.Attributed
```

## Parameters

- `format`: Set the symbol representation or pass nil to remove it.
