Identify whether the current or given date is about Christmas period.
npm install -g is-christmas-period
var isChristmasPeriod = require('is-christmas-period');
console.log(isChristmasPeriod()); // true or false
var twentiethOfDecember = new Date();
twentiethOfDecember.setDate(20);
twentiethOfDecember.setMonth(11);
isChristmasPeriod(twentiethOfDecember); // true
var eightthOfFebruary = new Date();
eightthOfFebruary.setDate(8);
eightthOfFebruary.setMonth(1);
isChristmasPeriod(eightthOfFebruary); // false
To execute tests, first install the project dependencies:
$ npm install
Then, run the tests
$ npm test
Many thanks to EditThisCookie Chrome extension.