? Enter the start time (hour : minute : second):
 :   : 
? Enter the end time (hour : minute : second):
 :   :   
? Elapsed time (hours : minutes : seconds):
 :   : 
?  
 
Brought to you by gocek.org!

This program calculates the elapsed hours, minutes and seconds between two times. The day, month and year are ignored. If the start time comes after the end time, the program assumes that midnight is crossed, i.e., the end time is on the day after the start time.

Times should be entered in 24-hour, "military" form. If you want to know the elapsed time between 3 pm and 1 am, you'd enter 15, 0 and 0 for the start time, and then 1, 0, and 0 for the end time. The result would be 10 hours, 0 minutes, and 0 seconds, and the label after the end time would say 'Next day'.

If you enter junk, such as letters instead of numbers, you'll see an error message.

JavaScript code Copyright 2010 by Gary Gocek