JS Data Diferença em segundos
var t1 = new Date();
var t2 = new Date();
var dif = t1.getTime() - t2.getTime();
Grepper
var t1 = new Date();
var t2 = new Date();
var dif = t1.getTime() - t2.getTime();
var t1 = new Date(YYYY, MM, DD, 0, 0, 0, 0);
var t2 = new Date(ZZZZ, NN, EE, 0, 0, 0, 0);
var dif = t1.getTime() - t2.getTime();
var Seconds_from_T1_to_T2 = dif / 1000;
var Seconds_Between_Dates = Math.abs(Seconds_from_T1_to_T2);