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

instadate

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instadate - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

20

instadate.js

@@ -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": {

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