count minutes between two dates javascript code example
Example 1: javascript get seconds between two dates
var secondBetweenTwoDate = Math.abs((new Date().getTime() - oldDate.getTime()) / 1000);
Example 2: javascript subtract 2 dates get difference in minutes
var diff = Math.abs(new Date('2011/10/09 12:00') - new Date('2011/10/09 00:00'));