Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imertz/greek-holidays
🇬🇷 Greek Holidays: A TypeScript library to fetch both fixed and movable national holidays of Greece for any given year. Ensures accuracy based on Orthodox Easter calculations and provides holidays' names in Greek.
https://github.com/imertz/greek-holidays
Last synced: about 2 months ago
JSON representation
🇬🇷 Greek Holidays: A TypeScript library to fetch both fixed and movable national holidays of Greece for any given year. Ensures accuracy based on Orthodox Easter calculations and provides holidays' names in Greek.
- Host: GitHub
- URL: https://github.com/imertz/greek-holidays
- Owner: imertz
- License: mit
- Created: 2023-08-10T22:45:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-10T22:52:49.000Z (over 1 year ago)
- Last Synced: 2023-10-11T06:50:12.147Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Greek Holidays 🇬🇷
Easily get the fixed and movable holidays for Greece in any given year.
## Installation
```bash
npm install greek-holidays
```## Usage
Here's a quick start guide on how to use the greekHolidays function.
```typescript
const { greekHolidays } = require('greek-holidays');// Get holidays for 2023
const holidays2023 = greekHolidays("2023");console.log(holidays2023);
```This will return an array of objects, each having a **date** and **name** in Greek.
## Features
- Retrieve all national holidays of Greece for a given year.
- Includes both fixed date holidays and movable holidays based on the Orthodox Easter.
- Automatically removes Labour Day (Εργατική Πρωτομαγιά) if it falls on a weekend or coincides with another holiday.## API
### greekHolidays(year: string): Holiday[]
- **year:** The year for which you want to fetch the holidays. Should be a string, e.g., "2023".
Returns an array of **Holiday** objects:```typescript
type Holiday = {
date: string;
name: string;
};
```