New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

compare-dates

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compare-dates - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

README.md

17

dist/compare.cjs.js

@@ -5,5 +5,5 @@ 'use strict';

function isValidDate (input) {
var isValidDate = function (input) {
return input instanceof Date && !isNaN(input.getTime());
}
};

@@ -47,2 +47,7 @@ const aliases = {};

function setDayOfWeek(date, input) {
const day = date.getDay();
date.setDate(date.getDate() + input - day);
}
function Duration(duration) {

@@ -133,2 +138,3 @@ var years = duration.year || 0,

/* falls through */
case 'week':
case 'day':

@@ -148,2 +154,7 @@ case 'date':

// weeks are a special case
if (units === 'week') {
setDayOfWeek(modified, 1);
}
// quarters are also special

@@ -327,2 +338,2 @@ if (units === 'quarter') {

exports.endOf = endOf;
exports.diff = diff;
exports.diff = diff;

@@ -1,4 +0,4 @@

function isValidDate (input) {
var isValidDate = function (input) {
return input instanceof Date && !isNaN(input.getTime());
}
};

@@ -42,2 +42,7 @@ const aliases = {};

function setDayOfWeek(date, input) {
const day = date.getDay();
date.setDate(date.getDate() + input - day);
}
function Duration(duration) {

@@ -128,2 +133,3 @@ var years = duration.year || 0,

/* falls through */
case 'week':
case 'day':

@@ -143,2 +149,7 @@ case 'date':

// weeks are a special case
if (units === 'week') {
setDayOfWeek(modified, 1);
}
// quarters are also special

@@ -310,2 +321,2 @@ if (units === 'quarter') {

export { min, max, isAfter, isBefore, isBetween, isSame, isSameOrAfter, isSameOrBefore, add, subtract, startOf, endOf, diff };
export { min, max, isAfter, isBefore, isBetween, isSame, isSameOrAfter, isSameOrBefore, add, subtract, startOf, endOf, diff };

22

package.json

@@ -5,3 +5,3 @@ {

"repository": "https://github.com/guardian/compare-dates",
"version": "1.1.0",
"version": "1.2.0",
"license": "Apache-2.0",

@@ -20,12 +20,12 @@ "main": "dist/compare.cjs.js",

"devDependencies": {
"babel-plugin-transform-es2015-modules-commonjs": "^6.10.3",
"babel-plugin-transform-es2015-parameters": "^6.9.0",
"babel-plugin-transform-es2015-spread": "^6.8.0",
"babel-register": "^6.9.0",
"eslint": "^2.13.1",
"rollup": "^0.32.2",
"rollup-plugin-babel": "^2.6.0",
"rollup-plugin-commonjs": "^3.0.0",
"rollup-plugin-node-resolve": "^1.5.0",
"tap": "^5.7.2"
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",
"babel-plugin-transform-es2015-parameters": "^6.24.1",
"babel-plugin-transform-es2015-spread": "^6.22.0",
"babel-register": "^6.24.1",
"eslint": "^4.2.0",
"rollup": "^0.45.2",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"tap": "^10.7.0"
},

@@ -32,0 +32,0 @@ "engines": {

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