datediff

Simple module for calculate difference bettwen two date

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
datediff
0.0.19 years ago9 years agoMinified + gzip package size for datediff in KB

Readme

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
}