javascript - Java script - adding times -
i'm trying add 2 times in format:
hh:mm:ss
eg: 12:31:32
, 01:32:39
i want write script adds times , result of must in same format.
how tell script add first 2 digits before : (hours) , 2 between 2 semicolons (minutes) , seconds?
i don't want make script want know how made.
if strings var time1 = "1:23:25"
need convert else work it.
you can manually, splitting string array , adding numbers , handling overflow (>60 seconds increase minutes etc) , joining hours, minutes , seconds create new string.
you can convert each date
can add numbers eg:time3=time1+time2
can format result original format.
Comments
Post a Comment