🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@mobylogix/public-holidays

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

@mobylogix/public-holidays

Public holidays by country. Readonly from google calendar.

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

public-holidays

Gets public holidays from google calendar.

Usage

const holidays = require('public-holidays');
// public holidays for US in English
const filter = {country: 'us', lang: 'en'};

holidays(filter, (error, result) => {
  
});

// public holidays for FR in French
filter = {country: 'fr', lang: 'fr'};

holidays(filter, (error, result) => {
  
});

API

holidays.url(country, lang)

Format google calendar url by country and language.

(filter, options, callback)

Get public holidays by filter.

filter:

  • country (string) (required) - country 2 letters code: us, ru
  • lang (string) (required) - language 2 letters code: en, ru
  • start (int) (optional) - start date: milliseconds
  • end (int) (optional) - end date: milliseconds

options

request options.

Result is an array of ordered holidays parsed by ical.

Keywords

holidays

FAQs

Package last updated on 29 Dec 2017

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