This is a lightweight JavaScript library to check if a given date is a US holiday.
You can install the library using npm:
npm install is-us-holiday-light
Or using yarn:
yarn add is-us-holiday-light
import { isUsHoliday } from 'is-us-holiday-light';
const date = new Date('2023-07-04');
console.log(isUsHoliday(date)); // true, because it's Independence Day
- New Year's Day
- Independence Day
- Veterans Day
- Election Day
- Christmas Eve
- Christmas Day
- Good Friday
- Juneteenth
- Martin Luther King Jr. Day
- Presidents' Day
- Memorial Day
- Labor Day
- Columbus Day
- Thanksgiving Day
- Day after Thanksgiving Day
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.