How would you check time difference from two text-boxes in Javascript?
In my case, I'm gonna store the time in milliseconds on chrome storage and try to find diff in hours later.
function timeDiffInHours(milliseconds){
time_diff = (new Date).getTime() - milliseconds
return parseInt((time_diff/(1000*60*60)) % 24)
}
// This is again sending current time and diff would be 0.
timeDiffInHours((new Date).getTime());