Advertisement
snuffi01

translate to php

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