@mobylogix/public-holidays
Public holidays by country. Readonly from google calendar.
Last updated 3 years ago by mobylogix .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mobylogix/public-holidays 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.1.2                                ...           latest (3 years ago)

2 Versions

  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |