Classes
Members
wrapsYear
Whether the span crosses into the following calendar year.
Methods
getNextOccurrence(fromDate)
Returns the next start date, i.e. when the span next opens.
Parameters:
| Name | Type | Description |
|---|---|---|
fromDate |
The date to calculate from (default: today) |
Returns:
The next start date
getOccurrencesInRange(startDate, endDate)
Gets the start dates of every span that opens within the given window.
Parameters:
| Name | Type | Description |
|---|---|---|
startDate |
Start of the window | |
endDate |
End of the window |
Returns:
Array of span start dates
getRangeFor(year)
Gets the concrete span for the year the run starts in.
Parameters:
| Name | Type | Description |
|---|---|---|
year |
The year the span starts in |
Returns:
The start and end dates, both inclusive
occursOn(date)
Whether the given date falls anywhere inside the span, endpoints included.
Parameters:
| Name | Type | Description |
|---|---|---|
date |
The date to check |
Returns:
true if the date is within the span