A
A
Alexander2017-04-26 10:48:22
JavaScript
Alexander, 2017-04-26 10:48:22

Working with time in JavaScript (add strings up to 15 minutes)?

hello everyone!
in the morning I’m stupid a little, help who is already awake:
I have n-number of lines with time, it looks like this:
26.4.2017 09:38:21 - 0:00:06 h
26.4. 00:14 h
26.4.2017 09:37:40 - 0:00:13 h... I
issue all this with this code:

t += "<td>" + start.getDate() + "." + (start.getMonth() + 1) + "." + start.getFullYear() + " " + addZero(start.getHours()) + ":" + addZero(start.getMinutes()) + ":" + addZero(start.getSeconds()) + "</td>";
                    t += "<td> - " + dauerString + "</td>";

help me add it up to 15 minutes, when 15 is reached, output 4/26/2017 09:35:00- 4/26/2017 09:50:00 - 0:07:12 h and start the next line 4/26/2017 09:50:00- 26.4.2017 10:05:00 - 0:02:53 h
Thank you all in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question