@quartz/holidays
Quartz holidays
Last updated 2 months ago by chriszarate .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @quartz/holidays 
SYNC missed versions from official npm registry.

Quartz holidays

npm version

Determine if a day is a Quartz holiday.

const { isHoliday } = require( '@quartz/holidays' );

// Is today a Quartz holiday?
isHoliday() && console.log( '????' );

// Is today a non-working day at Quartz (includes weekends)?
isHoliday( undefined, { weekends: true } ) && console.log( '????️' );

// Was a specific day a Quartz holiday?
isHoliday( new Date( '2018-07-04' ) ) && console.log( '????' );

Or get a list of all Quartz holidays for a given year. Note that dateString is formatted like the return values of getDate and getMonth. The date property is a Date instance.

const { getHolidays } = require( '@quartz/holidays' );

console.log( getHolidays( '2019' ) );
// [
//   {
//     name: "New Year's Day",
//     date: 2019-01-01T00:00:00.000Z,
//     dateString: '2019-1-1',
//   },
//   ...
// ]

Current Tags

  • 1.2.0                                ...           latest (2 months ago)

3 Versions

  • 1.2.0                                ...           2 months ago
  • 1.1.0                                ...           8 months ago
  • 1.0.0                                ...           9 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |