Socket
Socket
Sign inDemoInstall

@quartz/holidays

Package Overview
Dependencies
Maintainers
8
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quartz/holidays

Quartz holidays


Version published
Weekly downloads
1
Maintainers
8
Weekly downloads
 
Created
Source

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',
//   },
//   ...
// ]

FAQs

Package last updated on 06 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc