moment-holiday-australia

0.2.2 • Public • Published

moment-holiday-australia

Extends the moment library with functions to determine if a moment occurs during a South Australian public holiday

Public holiday data is stored inside module as of 0.2.0, data will be updated for future dates in module updates

Retrieving public holiday data from a web source will be returned in a future update

Example

var moment = require('moment')
require('moment-holiday-australia')
 
// Check if there is a public holiday on that date
moment('2016-12-26').isOnAustralianHoliday() // Returns true
moment('2016-12-26').isOnAustralianHoliday() // Returns false
 
// Check if that moment occurs during a public holiday, used to test for part-day public holiday
moment('2016-12-24 20:00').isDuringAustralianHoliday() // returns true as Christmas Eve occurs between 7PM and 12AM
moment('2016-12-24 13:00').isDuringAustralianHoliday() // returns false as Christmas Eve occurs between 7PM and 12AM
 

Package Sidebar

Install

npm i moment-holiday-australia

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

6.3 kB

Total Files

6

Last publish

Collaborators

  • semaja2