Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Calculate statutory and other holidays.
JavaScript
Branch: develop

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
rules
test
.gitignore
README.md
index.js
liberty.js
package.json

README.md

liberty

Adapted from Alex Dunae's holidays gem. Calculate the statutory holidays on a given day or in a date range.

Holidays are defined by iCalendar recurrence rules.

Currently only Canadian and New Zealand rules are implemented.

Usage

var Liberty = require('liberty'),
    holidays = new Liberty('ca');

holidays.on(new Date(2008, 8, 1)); // returns [ { name: 'Labour Day', date: Date } ]
holidays.between('2008-10-1', '2008-11-30') // returns Thanksgiving & Remembrance Day

Accepts anything moment will accept.

Something went wrong with that request. Please try again.