---
title: weekdayOrdinal
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsdatecomponents/weekdayordinal
---

# weekdayOrdinal

The ordinal number of weekdays.

## Declaration

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

## Discussion

Discussion Weekday ordinal units represent the position of the weekday within the next larger calendar unit, such as the month. For example, 2 is the weekday ordinal unit for the second Friday of the month. 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

### Accessing Weeks and Days

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