{"_id":"@date/holidays","_rev":"16-28d79614fbf534228572b0c429758793","name":"@date/holidays","description":"Store and compare holiday dates","dist-tags":{"latest":"0.4.2"},"versions":{"0.1.0":{"name":"@date/holidays","version":"0.1.0","description":"Store and compare holiday dates","main":"lib","keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"compile":"coffee --bare --compile lib","clean":"rm -rf lib/*.js","prepublish":"npm run compile","postpublish":"npm run clean","test":"mocha --compilers coffee:coffee-script/register --reporter spec --bail --check-leaks test/lib"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coffee-script":"^1.10.0","mocha":"^2.3.3"},"dependencies":{},"engines":{"node":">=0.10"},"gitHead":"f6382b0156a4981788ceed25c42d3a8e57d64343","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.1.0","_shasum":"37d6e5a0233cb397fbfe4b0ae366a212bc264d6c","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"date","email":"eli+npm@elidoran.com"},"dist":{"shasum":"37d6e5a0233cb397fbfe4b0ae366a212bc264d6c","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.1.0.tgz","integrity":"sha512-cZmcPI6DHd9z5NSQz30C4dFLlp0cGMxOG1Eucx1jDW7k9LgB8LTSNUW4sHSXIIu0lbSn4W5gtvi+lnbyiodHLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8eL/JR/qu+XJ2ZB2nw07kuatD3SyzSOTY+I/aesRbIAIhAMiKyLCqqwe1FmGfxBCyVpUounPc4I+Lk+3gdlpKsmSk"}]},"maintainers":[{"name":"date","email":"eli+npm@elidoran.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/holidays-0.1.0.tgz_1467260488720_0.0269634872674942"},"directories":{}},"0.2.0":{"name":"@date/holidays","version":"0.2.0","description":"Store and compare holiday dates","main":"lib","keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"compile":"coffee --bare --compile lib","clean":"rm -rf lib/*.js","prepublish":"npm run compile","postpublish":"npm run clean","test":"mocha --compilers coffee:coffee-script/register --reporter spec --bail --check-leaks test/lib"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coffee-script":"^1.10.0","mocha":"^2.3.3"},"dependencies":{},"engines":{"node":">=0.10"},"gitHead":"7d8e91385b9ac66dbe549ea83bc0341c866ab456","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.2.0","_shasum":"02a5d3c7eab4bf6484f7a7c410657b7b40c17fa6","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"date","email":"eli+npm@elidoran.com"},"dist":{"shasum":"02a5d3c7eab4bf6484f7a7c410657b7b40c17fa6","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.2.0.tgz","integrity":"sha512-hx8Ud6BTu5Ldwsq2eP2lfOLZfGYewVsQGN1cmgeKI90guLqhI/MydMSv+hYcfEuNGuezU0MA6eq+yaNl0L0C2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEcGtU4NmzrIOKuGXJqr0u9DVyd7DqJNE7TIiDr0WhcpAiEAk1dEECr5QlsqhDhEhKZwoejKTucW5uB6Fq8lDjd5n7Y="}]},"maintainers":[{"name":"date","email":"eli+npm@elidoran.com"},{"name":"elidoran","email":"eli+npm@elidoran.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/holidays-0.2.0.tgz_1467315915417_0.5319067249074578"},"directories":{}},"0.3.0":{"name":"@date/holidays","version":"0.3.0","description":"Store and compare holiday dates","main":"lib","files":["lib/index.js"],"keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"test":"mocha --require coffee-script/register --reporter spec --bail --check-leaks test/lib/*.coffee","test6":"nave use 6 npm test","test8":"nave use 8 npm test","test10":"nave use 10 npm test","test-all":"npm run test6 && npm run test8 && npm run test10","coverage":"istanbul cover -x 'build/**' _mocha -- --require coffee-script/register -R spec test/lib/*.coffee"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coffee-script":"^1.12.7","coveralls":"^3.0.2","istanbul":"^0.4.5","mocha":"^5.2.0"},"dependencies":{},"engines":{"node":">=6"},"gitHead":"10d19953d4eef8448ca34d3fd58192d0b596dafb","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.3.0","_npmVersion":"6.1.0","_nodeVersion":"10.7.0","_npmUser":{"name":"elidoran","email":"eli+npm@elidoran.com"},"dist":{"integrity":"sha512-fRBoTIjRWSjwCVv8OVWe1zEzg5agP0t6r5NYJc621Epi3fF5oZwg7umv7TALdvbgaR3eFnmyxhfvi5wkqrCgzQ==","shasum":"6d734e6a3e57930dccf11b1cd668f362989b29d3","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.3.0.tgz","fileCount":5,"unpackedSize":23700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUOj0CRA9TVsSAnZWagAAZxAP/32l3juzOCUcgdVgNbT8\ntpRVkAKHoSsm9SM0ufMBzPlZOU432yvb08Dl8v08tG/inlxYSXXyx6Q0zT0s\nRHElNBIDEDeFEXK2Dc/TBn5rN1cdOz/7wHI7SQDiN3bLDoHZA6uDiE9BZ1Kr\nLoRrE5Kat2f77MJEVBmdDbgxJ1/nXj/PMJnvkmSX6wddZdumFmpjNLlUOQEd\nvk+PR1D5r3ScctSxw40mSyP49StuueUHRELYMcXsd8ahONLZDG1LgfEpKG75\nElfCUwpMNSdsgoI1FDjolSyhR/rDtpLgN10kWbnwoud6XChq6c/l/dufwAwF\n4uHwBplgPzg6Ev/KGbKD4fa3MCIjj4PobDfBciTPHBXsMosqHUFpZL2hQ11B\nTHw3f6DBp0JUrcml9qilT9r9lcNNAVzmsApwaJUcP/MxHo4mArb6NAL+zu8P\nKT9hEXBAUpnj2SdfG+15UihlhcYgwaNShFJCF2RohSNuGM+WivmkwahMksSY\nyt2ktOlEEEOagC6swzh94K/WDEYESoH1EaBA1jFJ1z4XiuWPGLeN1eZ1CSFG\n6QAGqVqqbf7TMPcRH5X/PGfsidHRyxfNrbjEyZHiv6cJoZXizFvzUsJ3JC/A\n1s6DMxxCCcKF+NgpbcJoH4zErrWN571c7g5HF7p0BmhNthLQS9PsG3zSdamH\nB9Jb\r\n=tJj5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoQ+EH3WCIpg1urcO2TdDqjd533/0MgO8taikzMhYNugIgLLj/petmsrfmZLMZXg5awUA+xb8Fh1TFikY2sQjsoIs="}]},"maintainers":[],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/holidays_0.3.0_1532029172001_0.9285466908556677"},"_hasShrinkwrap":false},"0.3.1":{"name":"@date/holidays","version":"0.3.1","description":"Store and compare holiday dates","main":"lib","files":["lib/index.js"],"keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"test":"mocha --require coffee-script/register --reporter spec --bail --check-leaks test/lib/*.coffee","test6":"nave use 6 npm test","test8":"nave use 8 npm test","test10":"nave use 10 npm test","test-all":"npm run test6 && npm run test8 && npm run test10","coverage":"istanbul cover -x 'build/**' _mocha -- --require coffee-script/register -R spec test/lib/*.coffee"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coffee-script":"^1.12.7","coveralls":"^3.0.2","istanbul":"^0.4.5","mocha":"^5.2.0"},"dependencies":{"@flatten/array":"^1.1.7"},"engines":{"node":">=6"},"gitHead":"1a01f4f716b55325e627a2a1a13882ce7fd0fe3e","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.3.1","_npmVersion":"6.1.0","_nodeVersion":"10.7.0","_npmUser":{"name":"elidoran","email":"eli+npm@elidoran.com"},"dist":{"integrity":"sha512-iJROflH/5wizeXBYsTakfILCsoWqcHCzIqHiZs2wiitUyPEKAAi/eJbslzYp8vTHSJBhBhAf+Lw7KfLF/C/FOw==","shasum":"0983cf2a69b64d9f348bf6058e8b5b15bc157c59","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.3.1.tgz","fileCount":5,"unpackedSize":25277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUgisCRA9TVsSAnZWagAAvd0P/iBBxyZVg8h9UbWmPBwj\nzoGy376qS15CyLXa/QgvoNNGdnGMxa6Bl7A3In1uJjAEdmP5q78p2PIKfmuo\ngAdgkUCCfDD5SbfSE6f3lsXr7datMnQ/21QqCGj2MMXDSXuTuwXth2MJ08Xf\nrqC7uiUif3mFR2cIE2hgVNvwMKFGh5Gvrri+W8H1Xc+ouo717zfAG5IFSghm\nwgJtZMKlr2OuuMdK9Ds95x8QsM5nHa3NeYW6HyoMqrPLRc0rr4HV2SqVcXBC\nlRYf3KvWYJJA2k28XfG2byu3WZif2Md+zlgcEjeGezBml8ryFFO6qxHA3I2+\nZ3YXDWs4AWGyQLXn3MRqHqxO9bvLrgSFpj9rfKlXArdzaPl9DxpbEslNWe2t\nKhdEmYXidc4yBvld2/XdEudBds/pDEzjGc4G2tPY0Qc3qOCVjY+e8AJREjkC\nM5QaPu0Kpjy0CwUmJMLgC61gPKoerlpYIlhTyGCVHm891c2AC1IyItg05EvU\naa7c3yPhZAlPPzvnmF6kqs94JonKVghcsOU9SuckBzERvL9XkKIo7PRD9S8x\n6wHgb4eULHjIzNb8FdPxI8MAjh/0aK2vRKM589EiwbhTzvIA4Oaq5uOsUZzG\n6jCSVFRLuEE6Nj0BTn7U5XRO4Jz0TNXp5PvS5/OyoOfZG4sheh5F161axo+q\nevjN\r\n=Eq0n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCqZPUqzlLGuEKR5Ze0Hi9EgvmaCcWFZKnpfq764f0oQIgVbxqZXJgBnAM4/8QDZypbl/t1gAurakPGTvF98ha9Gs="}]},"maintainers":[],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/holidays_0.3.1_1532102828676_0.9592273387123906"},"_hasShrinkwrap":false},"0.3.2":{"name":"@date/holidays","version":"0.3.2","description":"Store and compare holiday dates","main":"lib","files":["lib/index.js"],"keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"test":"mocha --require coffee-script/register --reporter spec --bail --check-leaks test/lib/*.coffee","test6":"nave use 6 npm test","test8":"nave use 8 npm test","test10":"nave use 10 npm test","test-all":"npm run test6 && npm run test8 && npm run test10","coverage":"istanbul cover -x 'build/**' _mocha -- --require coffee-script/register -R spec test/lib/*.coffee"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coffee-script":"^1.12.7","coveralls":"^3.0.2","istanbul":"^0.4.5","mocha":"^5.2.0"},"dependencies":{"@flatten/array":"^1.1.7"},"engines":{"node":">=6"},"gitHead":"b5f4f1a737e7f8d7b409360b991bf52ff32a6f4f","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.3.2","_npmVersion":"6.1.0","_nodeVersion":"10.7.0","_npmUser":{"name":"elidoran","email":"eli+npm@elidoran.com"},"dist":{"integrity":"sha512-6lFrYLn394nNiCfDWGOyZ//Kff2AIxTYmiq2MZdaFDW5X4O27BnxGVjoQsyNdA6De3+k9ij9kyKbjZKPm40g1Q==","shasum":"95e1ac45aca147d930bf7b4adcede4d39a898325","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.3.2.tgz","fileCount":5,"unpackedSize":25759,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbUjg2CRA9TVsSAnZWagAAP/0P/0xFC6+sADp9yIDDuO70\nnrqh9nirXU+CpuBKIo8LXCkC0IphNccOND6mka9PmvlBNc3ABfhM0LzP6sIN\nY6xnl8ygynh56taD+R+att02lVsUtjraA9mzpnnBhzgy/f9kdtN1pnWC5CIp\nDSiKhKfiTs+K6rr17D/lyFZC+/icYRB4YW7FWnQImuxF2qFH/dDH79dJs83A\nO/0uVQWkdvj8dv9nlMT1tphN3YytFVaKtPrbb1SRrarTIN+blmzPdj0y8wsK\nyd4bFpsz77mO7JKpTIwjo4MhpYokHCVeXz2t0gphdTHJ2bFpOOxPcBW40gbK\n44sIt8p0LUT++3+2m0lq+lkQym4vqGbsOjjHFDupuI4PvyxV3Ih6kMGEC+Tr\nBgRjLtYKWV+GBI3/MgyHjziMDv3NoXIfNjE4D47bLK/s1uO6hQ6r/KWoUrPG\nEJ5FtwdNSjg3+ErY2Dx8FmkyzY/Yk8m0ENprTRbdRSDLcwCmviFgiNHdpvsF\naFjab+4/5O7waYi75ZrPWov+FXoxmCah4ipZ/GeGTT1GLF6aYwu7pujtVTme\n04UzcmTozwfTNylfmnck/AkisB0qzyJNm3/ilKWrTb5S8zOyZfJgQ6msC3PJ\ncfshb0lAp8Jsng3JniAYp5YmvvJELk2IpK7I+F57ntbyNAS52RJyMlC8NQrR\n4k4F\r\n=1rLF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVJQ04Vo9TwYD3KIRDAuj97u+W+QFypcq6kF7IKp8dVAiBZPtJqPNUqJCUY/hmvmiAUVSOrYV1Jj+6WCneC1PX7dQ=="}]},"maintainers":[],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/holidays_0.3.2_1532114998128_0.29929509803546495"},"_hasShrinkwrap":false},"0.4.0":{"name":"@date/holidays","version":"0.4.0","description":"Store and compare holiday dates","main":"lib","keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"lint":"eslint --no-eslintrc -c build/eslint/eslint.js --cache --cache-location build/eslint/cache index.js","test":"mocha --reporter spec --bail --check-leaks test/test.js","test8":"nave use 8 npm test","test10":"nave use 10 npm test","test12":"nave use 12 npm test","tests":"npm run test8 && npm run test10 && npm run test12","cover":"nyc --silent --no-clean npm run test","cover8":"nave use 8 npm run cover","cover10":"nave use 10 npm run cover","cover12":"nave use 12 npm run cover","covers":"npm run cover8 && npm run cover10 && npm run cover12","coverage":"npm run covers && nyc report --reporter=lcov --reporter=text-summary","travis":"npm run covers && nyc report --reporter=text-lcov | coveralls","browser":"npm run cover && nyc report --reporter=html"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coveralls":"^3.0.4","eslint":"^6.0.1","istanbul":"^0.4.5","mocha":"^6.1.4","mocha-lcov-reporter":"^1.3.0","nave":"^2.4.2","nyc":"^14.1.1"},"dependencies":{},"engines":{"node":">=8"},"gitHead":"d4a7824159e44d848add3d32d236aebf7646388e","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.4.0","_nodeVersion":"12.6.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-wT7102B3iMujVBoxHV81mk8D86Bj8mlUMnnYchmHpvjyvZ28aI+6BLYXsTA0c0tK2h0DbZfmWQGzVUJc4Lghuw==","shasum":"f50f68d5ba4ad2007232ae270db31c797b99ec36","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.4.0.tgz","fileCount":4,"unpackedSize":29021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPhyDCRA9TVsSAnZWagAAIMkQAJYhJ06QNM368EBO6qh9\ntAW7xAUxkREEWFNEZ7d5Q08JEIIxYq9Hm0DC9J7bjAz+ZxP4f3by03klI812\noGNXvP2lu2+LoWyzf85DtmobcpFvZH/OfS8oS3XhSHFMI1DE7KV9iALB4Jp0\nfIp6Oizi67Ho8nDvGqhiGICsuPLsEotxfCFE83oz/5BsA6hdAV0dxdcleSJZ\njAn5IaQLuhSIwM1tROB6VH9oao6CSzQYWASAPpIV1PVGevaFGAlHzpnD6xeN\nGvtTWE4jsdnWs5l6jYwAaecLCy1XWVR1vz9VpDgiZA9aYhbMpZ5douTKfKPb\n3W1zuN7KZIJoTEm5NSD0ENCk4HtXM+dfXSmIqRUGmUIVp1n5t3A22fcXa7xU\n/oalD6gE3I8+1eG8DFr/UMedqeWlYtEH/lF0iyUxU75EqCbDILqWXiJQF75c\nx6xBP5N8U9b1pwfiXpL0j1ocuDfFayEyQXJJXrWtI11bmLu/ViiyAOL+O9eI\nc2vwakiMbWrtKBZ9mvDkpFzCDJkU5AhG7LN2Tix7q4G0h6eIGIanGL5gulmv\nYr2Cn+vDyjhmOzmul1IiBVSe+PRG6PFJzZKe+1cidss2w0dr0ZxOwhv2OASa\nXDzQ5b2D738fyzW65j+05saNBLcIQCkpEktPvRQlyOqLliwOkQMLBQZPshCO\nTrzU\r\n=4Lnz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFnK4jb1ayKsccWi5+jpHGnqPRp1URmuw+c+KkHSLqSmAiEAso2bM86egw9tFwWcXDNCEU6PC3IrHHCGyYUmFA7k/KA="}]},"maintainers":[],"_npmUser":{"name":"elidoran","email":"eli+npm@elidoran.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/holidays_0.4.0_1564351618114_0.30770244792861456"},"_hasShrinkwrap":false},"0.4.1":{"name":"@date/holidays","version":"0.4.1","description":"Store and compare holiday dates","main":"lib","keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"lint":"eslint --no-eslintrc -c build/eslint/eslint.js --cache --cache-location build/eslint/cache index.js","test":"mocha --reporter spec --bail --check-leaks test/test.js","test8":"nave use 8 npm test","test10":"nave use 10 npm test","test12":"nave use 12 npm test","tests":"npm run test8 && npm run test10 && npm run test12","cover":"nyc --silent --no-clean npm run test","cover8":"nave use 8 npm run cover","cover10":"nave use 10 npm run cover","cover12":"nave use 12 npm run cover","covers":"npm run cover8 && npm run cover10 && npm run cover12","coverage":"npm run covers && nyc report --reporter=lcov --reporter=text-summary","travis":"npm run covers && nyc report --reporter=text-lcov | coveralls","browser":"npm run cover && nyc report --reporter=html"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coveralls":"^3.0.4","eslint":"^6.0.1","istanbul":"^0.4.5","mocha":"^6.1.4","mocha-lcov-reporter":"^1.3.0","nave":"^2.4.2","nyc":"^14.1.1"},"dependencies":{},"engines":{"node":">=8"},"gitHead":"1e8edd9d5f4dafe627fad7f97b28849f06ee5e74","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.4.1","_nodeVersion":"12.6.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-0v5fedkWzPMvw+jhz8FaKPs65DvfCDTKZejgcDFwH7CR0IIZ7vzRLTuUDDQE5YJjTE7ixNYXKeJoTlljV+ofMQ==","shasum":"6cfff12b98e5d4d29491a8f6306a503c21e7403f","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.4.1.tgz","fileCount":5,"unpackedSize":37975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPkCDCRA9TVsSAnZWagAA7EoP/RI++Ga1kU6R5r63j5d5\npuMLBqPm4RR3hm/IopuSbmnHQ29qP23j5fZDCt4F5y8as3ZVbLTeJAdqLg3s\nNAiCf92+NNB9cw8C/XRoAB4bEPbVbkBdZdGpY1/8IWALnxeZrOEq73n0yHW6\n+sKyNtU1t2Y9QXReFIJkU6alUpuP0Om9vupggVWvpKHJFlK1ygHAbVNxZCYi\nydWTcS6wfMKoVbl8R21Rv2KtleV6YGvXSehwBBql2EQZ0Ik3FDmBQn8omORc\nPw1QUt6RIK+VQbUpSjfvdJusTpBJBGgTAdAhv/8uT01vXLT0T4rIgoDRszFO\nec7gIpUZMCybbSZc5NfYiGMBPuaW86ExybGcoY2hCnxWMQUh3R4c81tkxI47\n5U7JxltYY8tIPMNgadKGX1udGPL3H9tIl7jYeyu8IY4+v/ul7ZkYZ9foyGUb\n+YVJti8i9imKPppYEkED04pSOYMmzCQwYLaIbXsx60qB/cz7Vv/PNA0yFIAB\n1RZIlACMln9VuGqPxr4s6tVRi1qgpL7ZH2AJI8bPfhS9TM2/Ze/WVLQOWfbX\nhXXb0wJipMgAh0v0K+47GbBSgTzsGHKKkbxtlZCcX960D4LeYUujEuEVh0bE\ncrX1HvgKyadMMbJtD29woSDaVfzpUqRgoBmpTimb0G2zsxjMNNlECiF7AQmh\n2syu\r\n=eKgg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdo57AaVRBuIyjEoT6SGuiwLFuTHogBWI8cMsMyEwrJAiEAiznKP7CjoCKfDsZF4qvfZVtpLyWb+C0L+9JM9iaJhZA="}]},"maintainers":[],"_npmUser":{"name":"elidoran","email":"eli+npm@elidoran.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/holidays_0.4.1_1564360834983_0.1844920397732055"},"_hasShrinkwrap":false},"0.4.2":{"name":"@date/holidays","version":"0.4.2","description":"Store and compare holiday dates","main":"index.js","keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"license":"MIT","scripts":{"lint":"eslint --no-eslintrc -c build/eslint/eslint.js --cache --cache-location build/eslint/cache index.js","test":"mocha --reporter spec --bail --check-leaks test/test.js","test8":"nave use 8 npm test","test10":"nave use 10 npm test","test12":"nave use 12 npm test","tests":"npm run test8 && npm run test10 && npm run test12","cover":"nyc --silent --no-clean npm run test","cover8":"nave use 8 npm run cover","cover10":"nave use 10 npm run cover","cover12":"nave use 12 npm run cover","covers":"npm run cover8 && npm run cover10 && npm run cover12","coverage":"npm run covers && nyc report --reporter=lcov --reporter=text-summary","travis":"npm run covers && nyc report --reporter=text-lcov | coveralls","browser":"npm run cover && nyc report --reporter=html"},"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"devDependencies":{"coveralls":"^3.0.4","eslint":"^6.0.1","istanbul":"^0.4.5","mocha":"^6.1.4","mocha-lcov-reporter":"^1.3.0","nave":"^2.4.2","nyc":"^14.1.1"},"dependencies":{},"engines":{"node":">=8"},"gitHead":"428fd77d8edadf99be15350512f8b752014a6128","homepage":"https://github.com/elidoran/node-date-holidays#readme","_id":"@date/holidays@0.4.2","_nodeVersion":"12.6.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-YZyOCHq62vlHKDcncw6xcfdwUbX7KGcsIyU3GqGCYO/V/YFzdo5kvVjMphOCXM8gTJeizjfOgAXfxx0gLfBb3A==","shasum":"59a095bcab2da9b8051bb7740462132ef4c03284","tarball":"https://registry.npmjs.org/@date/holidays/-/holidays-0.4.2.tgz","fileCount":5,"unpackedSize":37980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPkaeCRA9TVsSAnZWagAAC9cP/2rAUUZICJBSuGuXaA0z\nA2l+8zthLyjomZQVy7Vb0ZLfwR9sW4C4Eo0rCy1GnLJQYeZZCUSPJYoJQwz8\n5FYn3KQg6Z6HSpfrMgUiUgqLc3VKhBH2d403E7o8JzmKiGu9hM0pEPze5qMn\ny9QqOYtgVHoPAu6QHNWqpS+1J2bs4y4TF9Uz1jqojau6+EVQUKoAPwDvBb7l\nCD0eElXlPEbmL92U0SiG2OMfB6D9VH6VC5zl3YvAuFCQeeVnm8FZIbN2Ah9F\nHlynbEb9Mq7xXRWpmEv16HvyX9UdREP07yFNcB7y0FzqDgAAb1Y/PJkaNXCd\nru6RN6w3KiBLks0hus5ZQzxcezk2JS7TbMgfnOhxDOE+NNrqoCF4FfD2SEn2\nKLyQsjFcl20FsQq0Fdq1omci5RAwnziKqTV69DMcVLWP3++d92LbJhA2ahdZ\ngCw8ox0uN55THwTnvb3CbJXbIonyYg7wE+5rE0BFo5BmRFhzhYkWgr08U2eG\nw6IxcpESZAKZxpbvE4oxBX/mu5EunH+vHhdqYxFaVISnW71TTW78mz/mEaAY\nQY8zrVVkXcIL5dCRrZ92ZBHGISKUb9S0UHsPIRjGnKNUcGfjElKuzVBhmGM/\nEJUPKiXssn14JO83jkWbtSAkYTZA70d+JEbdOlRUIQCtOhbShM4j4Z6UJbME\n7LDQ\r\n=rsp/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDxvtaQdsPzZgvGl48KEFkzMuBeCimNdqWaiJvi+sClhAiEA6o9qoys4CMXwP6Sst/aoq6Pn/U29AOZtrF18+7Z+9ic="}]},"maintainers":[],"_npmUser":{"name":"elidoran","email":"eli+npm@elidoran.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/holidays_0.4.2_1564362397729_0.6593886460201295"},"_hasShrinkwrap":false}},"readme":"# @date/holidays\n[![Build Status](https://travis-ci.org/elidoran/node-date-holidays.svg?branch=master)](https://travis-ci.org/elidoran/node-date-holidays)\n[![npm version](https://badge.fury.io/js/%40date%2Fholidays.svg)](http://badge.fury.io/js/%40date%2Fholidays)\n[![Coverage Status](https://coveralls.io/repos/github/elidoran/node-date-holidays/badge.svg?branch=master)](https://coveralls.io/github/elidoran/node-date-holidays?branch=master)\n\nTest if dates are holidays and manage info related to the holidays.\n\nNote, version 0.4.0 changed the API due to a complete rewrite. Use the old API by installing the latest patch version of 0.3.\n\n\n## Install\n\n```sh\nnpm install --save @date/holidays\n```\n\n## Usage: Add Simple Holiday\n\nSome holidays are always on the same date so are easy to specify.\n\n```javascript\nconst Holidays = require('@date/holidays')\nconst holidays = Holidays()\n// all in one: const holidays = require('@date/holidays')()\n\n// at this point `holidays` is empty so all calls to isHoliday() return false.\n\n// simplest method for fixed dates only requires the month and day.\nconst removerFn = holidays.add({\n  // optional holiday info.\n  // defaults to {}.\n  // may be a function returning an object.\n  mainInfo: {\n    name: 'Valentine\\'s Day',\n    public: true,\n  },\n  // provide both the month and day\n  month: 1,  // NOTE: I prefer using months as 1-12, but, Date uses 0-11\n  day  : 14,\n})\n\n// You can remove the holiday from the holidays instance by calling its remover.\n// it will remove the function and its cache (if it's a caching holiday).\nremoverFn()\n```\n\n### Usage: Add Complicated Holiday\n\nSome holidays require calculating when they occur, and, whether they have an \"observed\" date as well.\n\nSpecify the range of dates the holiday can occur on and an `is()` function to test whether a `Date` is a holiday.\n\n```javascript\n// this holiday is available as: @date/IndependenceDay\n// Independence Day is always on July 4th\n// It has an \"observed\" holiday on the nearest weekday if it's on the weekend\nholidays.add({\n  // first way to specify the holiday's date range.\n  month: 6, // July is 6 because Date because 0-11\n  firstDay: 3,\n  lastDay: 5,\n\n  // // second way allows specifying multiple date ranges (as for New Year's Day)\n  // dateRange: [ // each element is an array with a range or individual date.\n  //   // this means July 3rd through July 5th.\n  //   [ 6, 3, 5 ]\n  //\n  //   // an individual day would be:\n  //   // [ 11, 31 ] // for December 31st (not relevant for Independence Day)\n  // ],\n\n  // optional holiday info.\n  // defaults to {}.\n  // may be a function returning an object.\n  mainInfo: {\n    name: 'Independence Day',\n    public: true, // it's a public holiday in USA\n    bank: true, // it's a bank holiday in USA when it's on a weekday.\n  },\n\n  // optional info for the observed days.\n  // defaults to `mainInfo`.\n  // may be a function returning an object.\n  observedInfo: {\n    name: 'Independence Day (observed)',\n    public: true,\n    bank: true, // the observed date is always a bank holiday.\n  },\n\n  // optional info when main date is on a weekend.\n  // defaults to `mainInfo`.\n  // may be a function returning an object.\n  mainInfoWhenObserved: {\n\n    name: 'Independence Day',\n    public: true,\n    bank: false, // when it's on the weekend it's not a bank holiday (the observed is)\n  },\n\n  // `date` is the `Date` instance.\n  // the other args are taken from the Date instance and used multiple times\n  // so they are provided as a convenience so you don't have to call those\n  // getters again.\n  // `year` is the \"full year\" 4-digits.\n  is: function isIndependenceDay(date, day, month, year) {\n\n    // get the weekday so we can see if it's the main, observed, or neither.\n    const weekday = date.getDay()\n\n    // return:\n    //  0 - not a match\n    //  1 - is the main holiday on a business day\n    //  2 - is the observed holiday on a business day\n    //  3 - is the main holiday on a weekend day\n    switch(day) {\n      // 3 for July 3rd which is the observed holiday when it's a Friday\n      case 3: return (weekday === 5) ? 2 : 0  // Friday July 3rd is \"observed\"\n\n      // 4 for July 4th, always a holiday, but is either main, or \"main when observed\"\n      case 4: return (1 <= weekday && weekday <= 5) ? 1 : 3\n\n      // 5 for July 5th which is the observed holiday when it's a Monday\n      case 5: return (weekday === 1) ? 2 : 0  // Monday July 5th is \"observed\"\n\n      // otherwise, not a match for the holiday.\n      default: return 0\n    }\n  },\n})\n\n// New Year's spans multiple months and multiple years because\n// it can be observed on the day before which is December 31st.\n// we support this with the `dateRange` property.\nholidays.add({\n  // all three \"info\" objects are optional.\n  dateRange: [\n    [ 12, 31 ],  // specific day: December 31st\n    [ 0, 1, 2 ], // range of days: January 1st to 2nd\n  ],\n  is: (date, day, month, year) => {\n    // Holidays ensures the date we receive is within the range we specified.\n    // so, we need to look at the day of week to determine our result.\n    const weekday = date.getDay()\n\n    switch(day) {\n      case 31: // only the observed holiday if it's a Friday\n        return (weekday === 5) ? 2 : 0\n\n      case 1: // always main holiday date, might be on weekend/weekday\n        return (1 <= weekday && weekday <= 5) ? 1 : 3\n\n      case 2: // only the observed holiday if it's a Monday\n        return (weekday === 1) ? 2 : 0\n\n      default: // otherwise, not a match\n        return 0\n    }\n  },\n})\n\n// a date may not have a set number which requires more processing.\nholidays.add({\n  mainInfo: {\n    name: 'Father\\'s Day',\n  },\n\n  // it's the third Sunday in June.\n  // so, month is 5 because Date uses 0-11,\n  // and, the days it could be on are June 15th to 21st.\n  dateRange: [\n    [ 5, 15, 21 ]\n  ],\n\n  is: function isFathersDay(date, day, month, year) {\n    // Holidays ensures it's within the date range we specified.\n    // so, is it a Sunday?\n    return (date.getDay() === 0) ? 1 : 0\n  },\n})\n```\n\n### Usage: Helpers\n\nWhen working with dates [@date/generator](https://github.com/elidoran/node-date-generator) and [@date/business](https://github.com/elidoran/node-date-business) help.\n\nThe individual holidays I'm publishing will all have a `gen(year)` function which returns a `Date` instance for that holiday in the specified year. It may also have an `observed` property set on it with the `Date` that holiday is \"observed\" in that year. This is what was used in the previous version of `@date/holidays`. The `@date/generator` package is helpful for that.\n\nThe `@date/business` package is helpful for changing a date to the next or previous business day. It accepts a `Holidays` instance so it will skip over holiday dates.\n\n\n## API\n\n### API: isHoliday()\n\nReturns false unless it is aware of a holiday on the specified date.\n\nExtra criteria can be specified and the holiday's `info` will be tested for those values. All specified values must exist in the `info` for it to return true.\n\n```javascript\nconst date = getSomeDate() // a `Date` object\n\n// test the date without filters, returns true/false\nholidays.isHoliday(date)\n\n// test the date with a single filter, returns true/false\nholidays.isHoliday(date, { some: 'thing' })\n\n// now with two filters:\nholidays.isHoliday(date, { some: 'thing', something: 'else' })\n```\n\n### API: getHoliday()\n\nGet an array of holiday \"info\" for all holidays on a specific date.\n\nIf there are no holidays on the date then an empty array is returned.\n\nThe \"info\" is an optional object provided when calling `holidays.add()`.\n\nSee [API: add()](#api-addobject)\n\n```javascript\ninfos = holidays.getHoliday(date)\n\nif (infos.length > 0) {\n  // then there was at least one holiday on that date.\n}\n\n// you can filter the results by supplying properties to check for in the \"info\".\ninfos = holidays.getHoliday(date, {\n  some: 'prop',\n  to: 'filter',\n})\n```\n\n\n### API: load() and loadMany()\n\nLoad a published holiday package into a `Holidays` instance.\n\nMay override default options for the holiday by providing an object as the second argument. It may contain any properties used in [add()](#api_addobject). The default options and the specified options will be combined.\n\nFor convenience, `loadMany()` accepts an array of arrays. Each sub-array should have the package name as the first element and an optional options override object as the second element.\n\nLook for published holidays in [@date](https://www.npmjs.com/org/date) organization.\n\n```javascript\n// one-line require and build:\nconst holidays = require('@date/holidays')()\n\n// load a single holiday package without overriding any options.\nholidays.load('the-package-name')\n\n// load a single holiday with some option overrides:\nholidays.load('some-package-name', {\n  // specify any properties used in holidays.add()\n})\n\n// to do the above for many packages at once:\nholidays.loadMany([ // NOTE: argument is an array of sub-arrays.\n  // sub-arrays may have only the package name:\n  [ 'package-name' ],\n\n  // or, they may also have an options override object:\n  [ 'some-name', { name: 'Changed Holiday Name', cache: true } ]\n])\n```\n\n\n### API: add(Object)\n\nAdds a holiday to the `holidays` instance.\n\nAdd accepts a single object argument containing the options for the holiday. The possible options are:\n\n\n| property | purpose |\n| -------: | :------------------------------\n| mainInfo | An optional object returned from `getHoliday()` and used when filtering results. May be a function which will then be called each time `getHoliday()` and `isHoliday()` is called and the holiday is a match on that date. This allows returning a fresh object each time. This is also the default \"info\" when either of the other 2 \"info\" properties is not specified. Defaults to an empty object. If \"mainInfoWhenObserved\" is specified as well then this one will only be used for a year when there is **not** an \"observed date\".\n| observedInfo | Same as `mainInfo` except it's returned when the date is for the \"observed date\" of the holiday. Defaults to `mainInfo` if not specified.\n| mainInfoWhenObserved | Same as `mainInfo` except, it's returned when the date is the \"main date\" of the holiday, but is on a weekend, so the holiday is \"observed\" on another date. Defaults to `mainInfo` if not specified.\n| month | The month of the holiday. Uses 0-11 as JavaScript `Date` does.\n| day | The day of the month of the holiday. Uses 1-31. Used for a \"fixed date\" holiday which is always on the same date.\n| firstDay | The first day in a range of dates the holiday may be on. Used with `lastDay`. For holidays which may be on different dates and ones with possible \"observed\" dates (usually before or after the \"main date\").\n| lastDay | The last day in a range of dates the holiday may be on. Used with `firstDay`.\n| dateRange | Provide multiple date ranges for a holiday which has a range spanning more than one month or year. For example, New Year's may be observed on December 31st which is both the previous month and previous year. An array of sub-arrays with each sub-array containing 2 elements: the month and the day, or 3 elements: the month, firstDay, and lastDay.\n| is | The test function which specifies whether a specific date is: 1. the \"main date\" without an \"observed date\" that year; 2. the \"observed date\"; 3. the \"main date\" with an \"observed date\" that year. Its arguments are `is(date, day, month, year)`. The later args are there for convenience because `Holidays` has already called the functions on the `date` to get those values for itself.\n| cache | Defaults to `false`. When set to `true` results of calling the `is()` will be cached in an object by year/month/day. Call `holidays.purge()` to replace all holiday cache objects with new empty objects.\n\nRead later sections about specific options. Below, let's look at them all together:\n\n```javascript\n// the simplest holiday on a fixed date of March 3rd without info.\n// the `mainInfo` will default to an empty object.\n// an `is()` function will be created for it.\nholidays.add({\n  month: 2,\n  day: 3,\n})\n\n// now returns true for any year:\nholidays.isHoliday(new Date(2000, 2, 3))\n\n// result is always an array containing holiday infos for the Date.\n// in this instance, it has one element which is the default empty object.\nresult = holidays.getHoliday(new Date(2000, 2, 3))\n\nif (result.length > 0) {\n  // then there was at least one holiday info returned...\n}\n\n// add some info to the date to use elsewhere, or,\n// use the info to filter results.\nholidays.add({\n  mainInfo: {\n    name: 'Some Holiday',\n    some: 'property',\n  },\n  month: 2,\n  day: 3,\n})\n\n// to filter, specify the properties you want the holiday to have.\n// this will return `true` because the property exists in `mainInfo`.\nholidays.isHoliday(new Date(2000, 2, 3), { some: 'property' })\n\n// can specify more than one property and both must exist and match.\nholidays.isHoliday(new Date(2000, 2, 3), {\n  name: 'Some Holiday',\n  some: 'property',\n})\n\n// these both will return false.\nholidays.isHoliday(new Date(2000, 2, 3), { some: 'thing else' })\nholidays.isHoliday(new Date(2000, 2, 3), { another: 'property' })\n\n\n// for holidays which can be on different dates or have observed dates\n// then an `is()` function is necessary.\nholidays.add({\n  // these holidays can have different \"info\" for:\n  //  1. the main date\n  //  2. the observed date\n  //  3. the main date when it's on a weekend, meaning there's an observed date.\n  // for example, setting a property like { bank: true } for a bank holiday.\n  // it'll only be true on the main date if it's a weekday.\n  // it'll always be true for the observed date.\n  // they can all be used for filtering as described above.\n  // the three properties for them are:\n  mainInfo: {},\n  observedInfo: {},\n  mainInfoWhenObserved: {},\n\n  // method #1 of specifying a date range:\n  // this is an array of arrays.\n  // each sub-array must have either 2 or 3 elements.\n  // 2 elements means it's specific date with the month then day.\n  // 3 elements means it's a range of days with the month, first day, and last day.\n  dateRange: [\n    // many holidays are one a set date and may have an observed date\n    // a day before or a day after it. So, a range of 3 days.\n    // can be in month 1 between the 2nd and 4th:\n    [ 1, 2, 4 ],\n  ],\n\n  // method #2 of specifying a date range:\n  // for date ranges with only a single range it can instead be specified like this:\n  month: 1,\n  firstDay: 2,\n  lastDay: 4,\n\n  // this is called to check a Date.\n  is: (date, day, month, year) {\n    // must return:\n    //  0 - not a match\n    //  1 - is the main holiday on a business day\n    //  2 - is the observed holiday on a business day\n    //  3 - is the main holiday on a weekend day\n\n    // get the weekday so we can see if it's the main, observed, or neither.\n    const weekday = date.getDay()\n\n    // check each day in the date range you specified.\n    // based on the weekday you can determine whether it's main/observed/main-when-observed.\n    switch(day) {\n      // 2 for February 2nd which is the observed holiday when it's a Friday\n      case 2: return (weekday === 5) ? 2 : 0\n\n      // 3 for February 3rd, always a holiday, but is either main, or \"main when observed\"\n      case 3: return (1 <= weekday && weekday <= 5) ? 1 : 3\n\n      // 4 for February 4th which is the observed holiday when it's a Monday\n      case 4: return (weekday === 1) ? 2 : 0\n\n      // otherwise, not a match for the holiday.\n      default: return 0\n    }\n  },\n})\n\n// any of the three \"info\" properties may specify a function instead of an Object.\n// they must return an Object.\n// this allows fresh objects to be returned each time it's needed.\nholidays.add({\n  mainInfo: () => { return { some: 'new object' } },\n  month: 4,\n  day: 5,\n})\n\n// by default, no caching is done. The `is()` function will be called each time.\n// some holiday dates are complicated to calculate (example: Easter).\n// it may be helpful to cache the results to avoid calling `is()` repeatedly.\n// to do that, simply specify the `cache` property set to `true`.\nholidays.add({\n  cache: true,\n  // ... the usual stuff here.\n})\n\n// To clear the cache of all caching holidays in a Holidays instance,\n// call `purge()`.\nholidays.purge()\n```\n\n\n#### API: add() - info trio\n\nThe `info` is used in two places:\n\n1. as the return value of `getHoliday()`\n2. for comparison of extra properties given to `isHoliday()` and `getHoliday()` as \"filters\" (second argument).\n\nAll \"info\" objects are optional.\n\nIf `mainInfo` isn't provided then it defaults to an empty object.\n\nBoth `observedInfo` and `mainInfoWhenObserved` default to the value of `mainInfo` (which defaults to an empty object).\n\nIf the holiday is always on the same date then only `mainInfo` will be used (I refer to those as \"simple fixed date\" holidays).\n\nIf the holiday may be \"observed\" on another date, usually one day before or one day after the \"main date\", then that \"observed date\" will return the `observedInfo` object.\n\nWhen there is an \"observed date\" in the year of the `Date` provided to `getHoliday()` or `isHoliday()` then the \"main date\" is on the weekend and it will return the `mainInfoWhenObserved` object.\n\nFor example, Valentine's Day is always February 14th and never has an observed date. So, only a `mainInfo` is useful.\n\nFor example, Independence Day's \"main date\" is always July 4th. It may be observed on July 3rd or July 5th. When July 4th is a weekday (Monday - Friday) then the `mainInfo` will be used for July 4th that year. If July 4th is on the weekend then `mainInfoWhenObserved` will be used for July 4th that year. When a year observes the holiday on the 3rd or 5th then the `observedInfo` will be used (otherwise, those days are not considered holidays).\n\nHow is this helpful? Consider the above example about Independence Day. It makes sense to have the `mainInfo` contain `bank: true` because it's a bank holiday. However, when the holiday is observed on the 3rd or 5th then the 4th is *not* a bank holiday. So, that's when `mainInfoWhenObserved` is helpful because it can contain `bank: false`. The `observedInfo` would contain `bank: true` because the \"observed date\" (in years where it occurs) is always a bank holiday.\n\n\n#### API: add() -  methods to specify dates\n\nHolidays have varied date configurations. So, `Holidays` allows specifying them in different ways.\n\n1. simple fixed date\n\nAlways on the same date without an \"observed date\". For example, Valentine's Day. Specify one like this:\n\n```js\nholidays.add({\n  // February 14th\n  month: 1,\n  day: 14,\n})\n```\n\n2. fixed date with possible observed dates\n\nThe \"main date\" is always on the same date and it may have an \"observed date\" one day before, or after, the \"main date\". For example, Independence Day is always on July 4th but may be observed on July 3rd or July 4th. Specify one like this:\n\n```js\n// method 1: properties\n// Independence Day: remember, 6 is July for JS Dates 0-11\nholidays.add({\n  month: 6,\n  firstDay: 3,\n  lastDay: 5,\n})\n\n\n// method 2: date range\nholidays.add({\n  dateRange: [\n    // [ month, firstDay, lastDay ]\n    // Independence Day:   (remember, 6 is July for JS Dates 0-11)\n    [ 6, 3, 5 ],\n  ],\n})\n\n// New Year's may span 2 months and 2 years when it's\n// observed the day before, which is December 31st.\n// here's how that would be specified:\nholidays.add({\n  dateRange: [\n    // the possible observed date of December 31st:\n    [ 11, 31 ],\n    // the range covering the \"main date\" and possible observed Date:\n    // January 1st to January 2nd:\n    [ 0, 1, 2 ],\n  ],\n})\n```\n\n3. variable date\n\nThe holiday date must be calculated for each year. One example is Father's Day which is always on the third Sunday in June. Another example is Easter which has a complicated calculation algorithm.\n\n```js\n// Father's day spans a week of possible dates:\n// method 1: properties\nholidays.add({\n  month: 5, // NOTE: 5 is June for JS Dates 0-11\n  firstDay: 15, // earliest date it could be on.\n  lastDay: 21,  // latest date it could be on.\n})\n\n// method 2: date range array\nholidays.add({\n  dateRange: [\n    // 5 is June for JS Dates 0-11\n    // 15 - earliest date it could be on.\n    // 21 - latest date it could be on.\n    [ 5, 15, 21 ],\n  ],\n})\n```\n\n#### API: add() - is()\n\nThe `is()` function returns a value in the range of zero to three for the specified date. The values mean:\n\n\nvalue  | meaning |\n -----: | :----------- |\n0 | not a match for the holiday.\n1 | is the \"main date\" of the holiday in a year **without** an \"observed date\".\n2 | is the \"observed date\" of the holiday for that year.\n3 | is the \"main date\" of the holiday in a year **with** an \"observed date\".\n\nThe `is()` function is optional for \"simple fixed dates\". The date info may be specified (see section above) and an `is()` function will be created for it.\n\nThe arguments are `(date, day, month, year)`. The first argument is the `Date` object. The later arguments are for convenience so you don't have to call functions on the `Date` to get them (the `Holidays` already calls them for itself so it provides them to `is()`).\n\nFor example:\n\n```js\n// a simple fixed date doesn't need an is().\n// it'll be auto-created.\nholidays.add({\n  month: 1,\n  day: 2,\n})\n\n// a \"fixed date\" holiday with a possible \"observed date\":\nholidays.add({\n  month: 6,\n  firstDay: 3,\n  lastDay: 5,\n  is: (date, day, month, year) => {\n    // this will only be called for dates within the date range specified.\n    // so, at this point, we already know the month is `6`,\n    // and the day is within the range 3 to 5.\n    // so, use the `day` and the \"day of the week\" to determine return result:\n    const weekday = date.getDay()\n\n    switch(day) { // based on the day of the month for the date:\n      // 3 for July 3rd which is the observed holiday when it's a Friday\n      case 3: return (weekday === 5) ? 2 : 0  // Friday July 3rd is \"observed\"\n\n      // 4 for July 4th, always a holiday, but is either main, or \"main when observed\"\n      case 4: return (1 <= weekday && weekday <= 5) ? 1 : 3\n\n      // 5 for July 5th which is the observed holiday when it's a Monday\n      case 5: return (weekday === 1) ? 2 : 0  // Monday July 5th is \"observed\"\n\n      // otherwise, not a match for the holiday.\n      default: return 0\n    }\n  },\n})\n\n// a variable date holiday:\nholidays.add({ // Father's day is third Sunday in June\n  dateRange: [\n    [ 5, 15, 21 ],\n  ],\n  is: (date, day, month, year) => {\n    // this will only be called for dates within the date range specified.\n    // so, at this point, we already know the month is `5`,\n    // and the day is within the range 15 to 21.\n    // so, all we care about is whether it's Sunday.\n    const weekday = date.getDay()\n    return (weekday === 0) ? 1 : 0\n  },\n})\n```\n\n\n### API: remove a holiday\n\nRemoves a holiday from a `Holidays` instance.\n\nThe `Holidays.add()` function returns a \"remover function\" which, when called, will remove the added holiday.\n\n```javascript\nconst someHolidaySpecification = getIt()\n\nconst removerFn = holidays.add(someHolidaySpecification)\n\nremoverFn()\n```\n\n\n### API: purge()\n\nWhen `cache:true` is specified in a holiday's options it will cache its results to avoid calling its `is()` function repeatedly for the same date.\n\nEach caching holiday creates its own cache object.\n\nCalling `purge()` on the `Holidays` instance will replace all cache objects with new empty objects.\n\n```javascript\n// creates all new empty caches.\nholidays.purge()\n```\n\n\n## [MIT License](LICENSE)\n","maintainers":[],"time":{"modified":"2022-06-12T16:57:16.758Z","created":"2016-06-30T04:21:30.214Z","0.1.0":"2016-06-30T04:21:30.214Z","0.2.0":"2016-06-30T19:45:17.203Z","0.3.0":"2018-07-19T19:39:32.083Z","0.3.1":"2018-07-20T16:07:08.732Z","0.3.2":"2018-07-20T19:29:58.272Z","0.4.0":"2019-07-28T22:06:58.225Z","0.4.1":"2019-07-29T00:40:35.167Z","0.4.2":"2019-07-29T01:06:37.904Z"},"homepage":"https://github.com/elidoran/node-date-holidays#readme","keywords":["holiday","holidays","dates","date","bank holiday","public holiday"],"repository":{"type":"git","url":"git://github.com/elidoran/node-date-holidays.git"},"author":{"name":"Eli Doran","email":"eli+npm@elidoran.com"},"bugs":{"url":"http://github.com/elidoran/node-date-holidays/issues"},"license":"MIT","readmeFilename":"README.md","users":{"elidoran":true}}