Comparing version 0.3.0 to 0.3.1
@@ -76,19 +76,29 @@ var difference = require('lodash.difference'); | ||
addDays: function (d, days) { | ||
return instadate.addMilliseconds(d, days * constants.MS_IN_DAY); | ||
var date = new Date(d); | ||
date.setDate(date.getDate() + days); | ||
return date; | ||
}, | ||
addHours: function(d, hours) { | ||
return instadate.addMilliseconds(d, hours * constants.MS_IN_HOUR); | ||
var date = new Date(d); | ||
date.setHours(date.getHours() + hours); | ||
return date; | ||
}, | ||
addMinutes: function(d, minutes) { | ||
return instadate.addMilliseconds(d, minutes * constants.MS_IN_MINUTE); | ||
var date = new Date(d); | ||
date.setMinutes(date.getMinutes() + minutes); | ||
return date; | ||
}, | ||
addSeconds: function (d, seconds) { | ||
return instadate.addMilliseconds(d, seconds * constants.MS_IN_SECOND); | ||
var date = new Date(d); | ||
date.setSeconds(date.getSeconds() + seconds); | ||
return date; | ||
}, | ||
addMilliseconds: function (d, ms) { | ||
return new Date(d.getTime() + ms); | ||
var date = new Date(d); | ||
date.setMilliseconds(date.getMilliseconds() + ms); | ||
return date; | ||
}, | ||
@@ -95,0 +105,0 @@ |
{ | ||
"name": "instadate", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A minimal high performance date library for Node.js and Browser", | ||
@@ -10,3 +10,3 @@ "main": "instadate.js", | ||
"scripts": { | ||
"test": "node test/main.js | faucet" | ||
"test": "TZ=Europe/Tallinn node test/main.js | faucet" | ||
}, | ||
@@ -13,0 +13,0 @@ "repository": { |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality 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
242
7766
2
2
0