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

# weekday(_:)

Change the representation of the weekday in the format.

## Declaration

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

## Parameters

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