@technobuddha > library > Time > Day
Function: occurrenceInMonth()
ts
function occurrenceInMonth(
input: Date,
dayOfWeek: DayOfWeek,
occurrence: number | "last",
options: DateOptions):
| null
| Date;Defined in: occurrence-in-month.ts:18
Determine the date of an occurrence of a weekday within a month
Parameters
| Parameter | Type | Description |
|---|---|---|
input | Date | A date within the month in question |
dayOfWeek | DayOfWeek | The day of the week to find the occurrence |
occurrence | number | "last" | The occurrence number, or 'last' to find the last occurrence |
options | DateOptions | see DateOptions |
Returns
| null | Date
A date object corresponding to the occurrence requested, or null if no such date exists in the month
Default Value
ts
utc false