Socket
Book a DemoInstallSign in
Socket

@18f/us-federal-holidays

Package Overview
Dependencies
Maintainers
6
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@18f/us-federal-holidays - npm Package Compare versions

Comparing version

to
3.0.2

4

index.js

@@ -7,3 +7,3 @@ const dayjs = require("dayjs");

const getDateFor = ({ day = 1, month, year }) =>
dayjs(`${year}-${month}-${day}`, "YYYY-MM-DD");
dayjs(`${year}-${month}-${day}`, "YYYY-M-D");

@@ -31,3 +31,3 @@ const getNthDayOf = (n, day, month, year) => {

const daysInMonth = dayjs(getDateFor({ month, year })).daysInMonth();
const lastDayOfMonth = dayjs(`${year}-${month}-${daysInMonth}`, "YYYY-MM-DD");
const lastDayOfMonth = dayjs(`${year}-${month}-${daysInMonth}`, "YYYY-M-D");

@@ -34,0 +34,0 @@ let result = lastDayOfMonth.day(day);

@@ -0,3 +1,12 @@

const customParseFormat = require("dayjs/plugin/customParseFormat");
const dayjs = require("dayjs");
const tap = require("tap");
// The customParseFormat plugin changes the way the dayjs() utility method
// handles format strings. Specifically, MM and DD format tokens will REQUIRE
// two-digit months and days, whereas the default constructor will happily take
// single-digit months and days. Add the plugin to our tests to make sure we
// still work in environments where the plugin is being used.
dayjs.extend(customParseFormat);
const federalHolidays = require("./index");

@@ -4,0 +13,0 @@

{
"name": "@18f/us-federal-holidays",
"version": "3.0.1",
"version": "3.0.2",
"description": "All about US federal holidays",

@@ -20,3 +20,4 @@ "main": "index.js",

"Tse Kit Yam (https://github.com/tsekityam)",
"Ben Berry (https://github.com/bengerman13)"
"Ben Berry (https://github.com/bengerman13)",
"Keith Pops (https://github.com/keithpops)"
],

@@ -23,0 +24,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.