let nowtime = "17:00"
let oldtime = "19:00"
var nowtime = "17:00"
var oldtime = "19:00"
function extractTime(str){
const [h, m] = str.split(':').map(v => +v)
const d = new Date();
d.setHours(h);
d.setMinutes(m);
d.setSeconds(0);
return d.getTime();
}
extractTime(nowtime)-extractTime(oldtime);
var nowtime = "19:00"
var oldtime = "17:00"