Find the time after 15 minutes of a given time in javascript

Find the time after 15 minutes of the set time in javascript Example: the given time is 2012-01-10 5:50, and I need to get as 2012-01-10 6:05

+4
source share
1 answer

This will work for you.

next = new Date ('Sun Jan 01 2012 5:45:10'); next.setMinutes (next.getMinutes() + 15 ); alert(next); //will result as Tue Jan 01 2012 6:00:10 
+8
source

Source: https://habr.com/ru/post/1392669/


All Articles