Question: how to calculate time difference using jquery?
Answer: To get the number of seconds, just divide that number by 1000 . To get hours, minutes, and seconds: var diff = Math. abs(new Date(end_time) - new Date(start_time)); var seconds = Math.