Socket
Socket
Sign inDemoInstall

datediff

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    datediff

Simple module for calculate difference bettwen two date


Version published
Weekly downloads
611
increased by34.88%
Maintainers
1
Install size
7.44 kB
Created
Weekly downloads
 

Readme

Source

datediff Build Status

Simple module to calculate difference between two date

Example

var from = new Date(2012, 8, 0,0,10, 12),
    to = new Date(2014, 0, 1, 0, 56, 13),
    diff;

diff = datediff(from, to);
console.log( diff )


{
	years: 1,
	months: 4,
	days: 3
	hours: 2,
	minutes: 46,
	seconds: 1
}

FAQs

Last updated on 24 May 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc