get ms betweem dates js code example
Example: js date difference in seconds
var t1 = new Date();
var t2 = new Date();
var dif = t1.getTime() - t2.getTime();
var t1 = new Date();
var t2 = new Date();
var dif = t1.getTime() - t2.getTime();