Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ods-holidays

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ods-holidays - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

lib/holiday.controller.js

@@ -10,3 +10,6 @@ var holidays = require('./holiday.model');

return Promise.all(holidaysInMonth).then((results) => {
if (results[0].serviceHoliday && results[0].serviceHoliday === date.format('MM-DD-YYYY') || results[0].date === date) {
var serviceHoliday = results[0].serviceHoliday;
var actualDate = results[0].date;
var givenDate = date.format('MM-DD-YYYY');
if ((serviceHoliday && serviceHoliday === givenDate) || actualDate === givenDate) {
return {isHoliday: true};

@@ -13,0 +16,0 @@ }

2

package.json
{
"name": "ods-holidays",
"version": "1.0.1",
"version": "1.0.2",
"description": "API for calculating correct past and future dates of government recognized holidays in Ontario",

@@ -5,0 +5,0 @@ "author": "Cheyenne Arrowsmith <cheyenne.arrowsmith@ontario.ca>",

@@ -114,4 +114,4 @@ ## Ontario Digital Serice Public Holidays Calulator

This function is currently used to return whether a given date (in the format MM-DD-YYYY) is a government holiday. This informs services that government offices et al would be closed on these dates.
It will run the function for a given month and if the given date matches the returned date OR the serviceHoliday date (if it exists) then it will return `{isHoliday: true}`, otherwise it returns `{isHoliday: false}`.
For example: If January 1st of a given year falls on a Saturday then January 3rd would be the government holiday and therefore return `{isHoliday: true}` if 01-03-`year` fulfilled these requirements.

@@ -118,0 +118,0 @@ #### Running tests

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