Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

11holidays

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

11holidays

Global holidays API for public holidays, bank holidays and observances from 230+ countries

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

11holidays

Global holidays API for public holidays, bank holidays and observances from 230+ countries.

Holidays API

To retrieve the complete holidays list by specific country code and year

const instance = new HolidaysApi(API_KEY);
const holidays = await instance.holidays.list({country: 'US', year: '2023'});

console.log(holidays);

[
  {
    "holiday_id": 6093,
    "name": "New Year's Day",
    "date": "2023-01-01",
    "description": "...",
    "occasion_id": 6220,
    "country": "US",
    "type": "State Holiday",
    "created_at": "2023-10-28 15:10:10",
    "updated_at": null
  },
  {
    "holiday_id": 6094,
    "name": "New Year's Day",
    "date": "2023-01-01",
    "description": "...",
    "occasion_id": 6220,
    "country": "US",
    "type": "Federal Holiday",
    "created_at": "2023-10-28 15:10:10",
    "updated_at": null
  },
  ...
]

Parameters

country (2 char) - Required. 2 character ISO country code. year (integer) - Required. Year in 4 digit format.

Countries API

To retrieve the complete list of countries

const instance = new HolidaysApi(API_KEY);
const countries = await instance.countries.list();

console.log(countries);

[
   {"country":"US","name":"United States"},
   {"country":"IN","name":"India"}
]

Keywords

FAQs

Package last updated on 05 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc