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.1.0 to 0.1.1

19

instadate.js

@@ -16,3 +16,5 @@ var difference = require('lodash.difference');

noon: function(d) {
utc: utc,
noon: function (d) {
var date;

@@ -28,18 +30,18 @@ if (d) {

/* Diffrence between dates */
/* Difference between dates */
differenceInDays: function (d1, d2) {
return trunc((d2 - d1) / constants.MS_IN_DAY);
return trunc((utc(d2) - utc(d1)) / constants.MS_IN_DAY);
},
differenceInHours: function (d1, d2) {
return trunc((d2 - d1) / constants.MS_IN_HOUR);
return trunc((utc(d2) - utc(d1)) / constants.MS_IN_HOUR);
},
differenceInMinutes: function (d1, d2) {
return trunc((d2 - d1) / constants.MS_IN_MINUTE);
return trunc((utc(d2) - utc(d1)) / constants.MS_IN_MINUTE);
},
differenceInSeconds: function (d1, d2) {
return trunc((d2 - d1) / constants.MS_IN_SECOND);
return trunc((utc(d2) - utc(d1)) / constants.MS_IN_SECOND);
},

@@ -242,2 +244,7 @@

function utc(d) {
return Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(),
d.getMinutes(), d.getSeconds(), d.getMilliseconds());
}
function isBetween(d, start, end, beforeFn, afterFn) {

@@ -244,0 +251,0 @@ if (start > end) {

{
"name": "instadate",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "instadate.js",

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