hol
holidays
npm i holidays
hol

holidays

Calculates holidays in a given year, currently only supports Icelandic holidays.

by Guðmundur Bjarni Ólafsson

0.0.1 (see all)License:MITTypeScript:Not FoundCategories:Vanilla JavaScript Holidays
npm i holidays
Readme

holidays

Build Status

Calculates holidays in a given year, currently only supports Icelandic holidays.

Example

var holidays = require('holidays');
var dates = holidays(2013);
console.dir(dates);

[ Tue Jan 01 2013 00:00:00 GMT+0000 (GMT),
  Thu Mar 28 2013 00:00:00 GMT+0000 (GMT),
  Fri Mar 29 2013 00:00:00 GMT+0000 (GMT),
  Sun Mar 31 2013 00:00:00 GMT+0000 (GMT),
  Mon Apr 01 2013 00:00:00 GMT+0000 (GMT),
  Thu Apr 25 2013 00:00:00 GMT+0000 (GMT),
  Wed May 01 2013 00:00:00 GMT+0000 (GMT),
  Thu May 09 2013 00:00:00 GMT+0000 (GMT),
  Sun May 19 2013 00:00:00 GMT+0000 (GMT),
  Mon May 20 2013 00:00:00 GMT+0000 (GMT),
  Mon Jun 17 2013 00:00:00 GMT+0000 (GMT),
  Mon Aug 05 2013 00:00:00 GMT+0000 (GMT),
  Tue Dec 24 2013 13:00:00 GMT+0000 (GMT),
  Wed Dec 25 2013 00:00:00 GMT+0000 (GMT),
  Thu Dec 26 2013 00:00:00 GMT+0000 (GMT),
  Tue Dec 31 2013 13:00:00 GMT+0000 (GMT) ]

Methods

var holidays = require('holidays')

holidays(year)

Return an array with the holidays for a given year. Note that the hour part specifies after which hour in the day is it becomes a holiday.

Install

With npm do:

npm install holidays

License

MIT

Thanks

  • Árni Hermann for telling me that there is a function for calculating holidays.
  • Steinar Hugi for giving me a python implementation.

Downloads/wk

2

GitHub Stars

3

LAST COMMIT

9yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.0.1
latest
9yrs ago
No tutorials found
Add a tutorial