United States Holidays
Provide utility classes to work with United States holidays.
Currently 11 federal holidays are supported.
Good Friday is also supported.
Martin Luther King Jr. Day started in 1986. However, the stock market only started observing it in 1998. This library uses the 1998 date.
Juneteenth started in 2021. However, the stock market only observing it in 2022. This library uses the 2022 date.
Install
yarn add us-holidays
Usage
import { Holidays } from 'us-holidays';
const independenceDay = Holidays.independenceDay;
console.log(independenceDay.getter(2024));
console.log(independenceDay.getter(2023));
for (const holiday of Holidays.all) {
}
import Year from 'us-holidays/year';
const year = new Year(2024);
console.log(year.christmasDay);
console.log(year.independenceDay);