---
title: year()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/datecomponents/iso8601formatstyle/year()
---

# year()

## Declaration

```swift
func year() -> DateComponents.ISO8601FormatStyle
```
