JavaScript function that calculates the timespan between two given times.