date-arithmetic
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -141,4 +141,4 @@ var MILI = 'milliseconds' | ||
return dates.gte(day, min, unit) | ||
&& dates.lte(day, max, unit) | ||
return (!min || dates.gte(day, min, unit)) | ||
&& (!max || dates.lte(day, max, unit)) | ||
}, | ||
@@ -145,0 +145,0 @@ |
{ | ||
"name": "date-arithmetic", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "simple date math util", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,1 +47,6 @@ var assert = require('assert') | ||
assert.ok(dateMath.inRange(date, new Date(2013,0,1,0,0,0,0), new Date(2014,5,1,0,0,0,0)), 'inRange year') | ||
assert.ok(!dateMath.inRange(new Date(2013,0,1,0,0,0,0), date, new Date(2014,5,1,0,0,0,0)), 'inRange year') | ||
assert.ok(dateMath.inRange(date, null, new Date(2014,5,1,0,0,0,0)), 'inRange year') | ||
assert.ok(dateMath.inRange(date, new Date(2013,0,1,0,0,0,0), null), 'inRange year') | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12298
199
1