Answer the question
In order to leave comments, you need to log in
How to add time easily in javascript?
Input data - 8:30
To this number you need to add, say, 45 minutes.
The output should output the line - 9:15
How to make it easier / more correct / more elegant?
Answer the question
In order to leave comments, you need to log in
var time1 = new Date('9.10.2014 8:45')
, time2 = new Date(+time1 + 45 * 6e4); // => Thu Oct 09 2014 09:15:00
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question