Classes
Members
LAST
Sentinel occurrence value meaning "the last one in the month".
Methods
(static) getNthWeekdayOfMonth(year, month, dayOfWeek, occurrence)
Calculates the Nth occurrence of a weekday in a given month/year.
Parameters:
| Name | Type | Description |
|---|---|---|
year |
The year | |
month |
The month (1-12) | |
dayOfWeek |
Day of week (0-6, Sunday-Saturday) | |
occurrence |
Which occurrence (1-5), or RelativeDateEntry.LAST |
Returns:
The calculated date or null if it doesn't exist
(static) parseRelativeDate(dateStr)
Parses a relative date string (e.g., "3MondayJan") into components.
A leading `L` means the last occurrence in the month ("LMondayMay"),
which is how holidays such as Memorial Day are actually defined.
Parameters:
| Name | Type | Description |
|---|---|---|
dateStr |
The date string to parse |
Returns:
Object with occurrence, dayOfWeek, and month