Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var today = new Date();
- today.setHours(today.getHours() + 1);
- today.setMinutes(today.getMinutes() + 30);
- var coeff = 1000 * 60 * 5;
- var date = "09:07:00"; //or use any other date
- var rounded = new Date(Math.round(today.getTime() / coeff) * coeff)
- var tid_1hour_from_now = rounded.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'});
- var tid_hour = rounded.getHours();
- var tid_minutes = rounded.getMinutes();
- var ater = "Åter"
- var result1hourfromnow = ater +" "+ tid_1hour_from_now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement