---
title: weekOfYear
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsdatecomponents/weekofyear
---

# weekOfYear

The ISO 8601 week date of the year.

## Declaration

```swift
var weekOfYear: Int { get set }
```

## Discussion

Discussion This value is interpreted in the context of the calendar with which it is used—see Calendars, Date Components, and Calendar Units in Date and Time Programming Guide.

## See Also

### Related Documentation

- [yearForWeekOfYear](foundation/nsdatecomponents/yearforweekofyear.md)

### Accessing Weeks and Days

- [weekday](foundation/nsdatecomponents/weekday.md)
- [weekdayOrdinal](foundation/nsdatecomponents/weekdayordinal.md)
- [weekOfMonth](foundation/nsdatecomponents/weekofmonth.md)
- [day](foundation/nsdatecomponents/day.md)
- [week()](foundation/nsdatecomponents/week().md)
- [setWeek(_:)](foundation/nsdatecomponents/setweek(_:).md)
