Question: how to calculate hours between two times in javascript?
Answer: function diff_hours(dt2, dt1)
{
var diff =(dt2. getTime() - dt1. getTime()) / 1000;
diff /= (60 * 60);
return Math. abs(Math. round(diff));
}