# Calendar Technical Reference

Canonical page: https://www.adaptabletools.com/docs/technical-reference-calendar

## Calendar Options

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [holidays](https://www.adaptabletools.com/docs/reference/calendaroptions.md#holidays) | `(Date \| string)[] \| ((baseContext: `[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md)`) => (Date \| string)[] \| undefined)` | Public / bank holidays for the current user (calendar days only).<br/><br/>These are distinct from weekends: a Saturday is not a holiday unless it is<br/>also listed here. Entries may be `Date` instances or ISO date strings<br/>(`yyyy-MM-dd`). | undefined |
| [weekendDays](https://www.adaptabletools.com/docs/reference/calendaroptions.md#weekenddays) | `number[]` | Days of the week treated as weekend (non-working), using JavaScript<br/>`Date.getDay()` values: `0` = Sunday … `6` = Saturday. | [0, 6] |
| [weekStartsOn](https://www.adaptabletools.com/docs/reference/calendaroptions.md#weekstartson) | `number` | First day of the week for week-related Expression Functions<br/>(`WEEK`, `START_OF_WEEK`, `IS_THIS_WEEK`), using JavaScript<br/>`Date.getDay()` values: `0` = Sunday … `6` = Saturday.<br/><br/>Independent of . | 0 |

See [Holiday Calendars](https://www.adaptabletools.com/docs/dev-guide-tutorial-holiday-calendars/index.md) for how holidays, weekends and week start are supplied

-----------

## Calendar API

| Method | Returns | Description |
| --- | --- | --- |
| [getNextWorkingDay(from)](https://www.adaptabletools.com/docs/reference/calendarapi.md#getnextworkingday) | `Date` | Returns the next working day after `from` (defaults to today).<br/>Never returns `from` itself. |
| [getPreviousWorkingDay(from)](https://www.adaptabletools.com/docs/reference/calendarapi.md#getpreviousworkingday) | `Date` | Returns the previous working day before `from` (defaults to today).<br/>Never returns `from` itself. |
| [getWeekStartsOn()](https://www.adaptabletools.com/docs/reference/calendarapi.md#getweekstartson) | `number` | First day of the week for week-number / start-of-week Expression Functions<br/>(`calendarOptions.weekStartsOn`, default `0` = Sunday). |
| [isHoliday(dateToCheck)](https://www.adaptabletools.com/docs/reference/calendarapi.md#isholiday) | `boolean` | True when the date is in the configured holiday list.<br/>Weekends are not holidays unless also listed in `calendarOptions.holidays`. |
| [isSameDay(date1, date2)](https://www.adaptabletools.com/docs/reference/calendarapi.md#issameday) | `boolean` | Returns true if both dates are the same calendar day (time ignored). |
| [isToday(dateToCheck)](https://www.adaptabletools.com/docs/reference/calendarapi.md#istoday) | `boolean` | Returns true if the given date is today |
| [isTomorrow(dateToCheck)](https://www.adaptabletools.com/docs/reference/calendarapi.md#istomorrow) | `boolean` | Returns true if the given date is tomorrow |
| [isWeekend(dateToCheck)](https://www.adaptabletools.com/docs/reference/calendarapi.md#isweekend) | `boolean` | True when the date falls on a configured weekend day<br/>(`calendarOptions.weekendDays`, default Saturday/Sunday). |
| [isWorkingDay(dateToCheck)](https://www.adaptabletools.com/docs/reference/calendarapi.md#isworkingday) | `boolean` | True when the date is neither a weekend day nor a configured holiday. |
| [isYesterday(dateToCheck)](https://www.adaptabletools.com/docs/reference/calendarapi.md#isyesterday) | `boolean` | Returns true if the given date is yesterday |
