Time Calculation Javascript Library