Coder Social home page Coder Social logo

imertz / greek-holidays Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 3 KB

🇬🇷 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.

License: MIT License

TypeScript 100.00%

greek-holidays's Introduction

Greek Holidays 🇬🇷

Easily get the fixed and movable holidays for Greece in any given year.

Installation

npm install greek-holidays

Usage

Here's a quick start guide on how to use the greekHolidays function.

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:
type Holiday = {
  date: string;
  name: string;
};

greek-holidays's People

Contributors

imertz avatar

Stargazers

Dimitris Michalakos avatar John Tsevdos avatar Theofilos Intzoglou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.