Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/the-best-codes/best-holiday
Holidays and JavaScript; now Customizable and Effortless
https://github.com/the-best-codes/best-holiday
bestcodes holiday holidays javascript js library npm typescript
Last synced: 3 months ago
JSON representation
Holidays and JavaScript; now Customizable and Effortless
- Host: GitHub
- URL: https://github.com/the-best-codes/best-holiday
- Owner: The-Best-Codes
- License: gpl-3.0
- Created: 2024-07-25T20:19:58.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-10T01:37:45.000Z (3 months ago)
- Last Synced: 2024-11-10T02:25:14.954Z (3 months ago)
- Topics: bestcodes, holiday, holidays, javascript, js, library, npm, typescript
- Language: TypeScript
- Homepage:
- Size: 12.1 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
[![npm version](https://img.shields.io/npm/v/best-holiday.svg)](https://www.npmjs.com/package/best-holiday)
[![npm downloads](https://img.shields.io/npm/dm/best-holiday.svg)](https://www.npmjs.com/package/best-holiday)
[![npm license](https://img.shields.io/npm/l/best-holiday.svg)](https://www.npmjs.com/package/best-holiday)## `best-holiday`
Holidays and JavaScript; now Customizable and Effortless
## About
Best-Holiday aims to make it easier for developers to interact with holidays in their applications. Best-Holiday can be used via the npm package or through the CDN for browser use.
The list of holidays can be found in [src/index.ts](https://github.com/The-Best-Codes/best-holiday/blob/main/src/index.ts). Holidays have four attributes:
- `name`: Name of the holiday
- `date`: Date of the holiday
- `country`: Country where the holiday is
- `type`: Type of the holiday## Installation
Installing Best-Holiday is simple.
**npm**
In your project directory, run:```bash
npm install best-holiday
```**yarn**
In your project directory, run:```bash
yarn add best-holiday
```If you want to use Best-Holiday in the browser environment, include this script tag in your HTML document:
```html
```
## Usage
The Best-Holiday package currently exports six main functions:
- `getHolidaysForDays`: Returns an array of holidays for a given date
- `getHolidaysInRange`: Returns an array of holidays for a given range
- `searchHolidays`: Returns an array of holidays for a given search query
- `getEasterRelatedHoliday`: Returns the Easter related holiday
- `addHoliday`: Adds a new holiday
- `removeHoliday`: Removes a holidayFor more detailed information about usage, refer to the [Wiki](https://github.com/The-Best-Codes/best-holiday/wiki).
## License
[GPL-3.0-or-later](https://github.com/The-Best-Codes/best-holiday/blob/main/LICENSE)
## Contributors
- [The-Best-Codes](https://github.com/The-Best-Codes)
---
© 2024 [The-Best-Codes](https://github.com/The-Best-Codes)