@quartz/holidays
Advanced tools
Comparing version 1.0.0 to 1.1.0
12
index.js
@@ -16,3 +16,3 @@ const { allForYear } = require( '@18f/us-federal-holidays' ); | ||
// Add Christmas Eve, New Year's Eve, and the day after Thanksgiving. | ||
// Add the day after Thanksgiving. | ||
const thanksgiving = fedHolidays.find( ( { name } ) => name.toLowerCase().includes( 'thanksgiving' ) ); | ||
@@ -29,12 +29,2 @@ const blackFriday = new Date( new Date( thanksgiving.date ).getTime() + 60 * 60 * 24 * 1000 ); | ||
}, | ||
{ | ||
name: 'Christmas Eve', | ||
date: new Date( `${year}-12-24` ), | ||
dateString: `${year}-12-24`, | ||
}, | ||
{ | ||
name: 'New Year\'s Eve', | ||
date: new Date( `${year}-12-31` ), | ||
dateString: `${year}-12-31`, | ||
}, | ||
].sort( ( a, b ) => a.date < b.date ? -1 : 1 ); | ||
@@ -41,0 +31,0 @@ } |
{ | ||
"name": "@quartz/holidays", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Quartz holidays", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Quartz holidays | ||
[![npm version](https://badge.fury.io/js/%40quartz%2Fholidays.png)](https://badge.fury.io/js/%40quartz%2Fholidays) | ||
Determine if a day is a Quartz holiday. | ||
``` | ||
```js | ||
const { isHoliday } = require( '@quartz/holidays' ); | ||
@@ -22,3 +24,3 @@ | ||
``` | ||
```js | ||
const { getHolidays } = require( '@quartz/holidays' ); | ||
@@ -25,0 +27,0 @@ |
37
4204
66