JavaScript obtient des secondes entre deux dates
var secondBetweenTwoDate = Math.abs((new Date().getTime() - oldDate.getTime()) / 1000);
Mobile Star
var secondBetweenTwoDate = Math.abs((new Date().getTime() - oldDate.getTime()) / 1000);
var t1 = new Date();
var t2 = new Date();
var dif = t1.getTime() - t2.getTime();