Question: how to calculate time difference in javascript?
Answer: Calculate the time difference in hours and minutes with: floor((diff/60)); minutes =(diff%60); } else { var diff1 = getTimeDiff('24:00', '{time1}', 'm'); var diff2 = getTimeDiff('{time2}', '00:00', 'm'); var totalDiff = diff1+diff2; hours = Math.