I want to check if a time is earlier than another time using JavaScript or any JavaScript library.
For example I have t1=12:45:30 and t2=12:45:35 I want to check if t1 is earlier than t2. How can I easily do it using JavaScript? 
I was trying the following code:
if(t1<t2)
But it is not working.
 
     
    