d = nweekdate(n, weekdayNumber, yearNumber, monthNumber)
| Parameter | Description |
|---|---|
| inputs | Occurrence number, weekday number, year number, and month number. |
| Parameter | Description |
|---|---|
| output | A serial date number, or NaN when the requested occurrence does not exist. |
Return the nth selected weekday in a month.
Weekday numbers follow weekday: Sunday is 1 and Saturday is 7.
Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.
datestr(nweekdate(2, 2, 2024, 1))
nweekdate(5, 2, 2024, 2)
| Version | Description |
|---|---|
| 2.0.0 | initial version |