Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function showCountDown () {
- var nextdate = new Date(2017, 9, 24, 10)
- var curDate = new Date()
- var seconds, minutes, hours
- seconds = Math.floor((nextdate - curDate) / 1000)
- minutes = Math.floor(seconds / 60 )
- seconds = seconds % 60
- hours = Math.floor(minutes/60)
- minutes = minutes % 60;
- console.log(hours + ':' + minutes + ':' + seconds)
- }
- var interval = setInterval(showCountDown, 1000)
Add Comment
Please, Sign In to add comment