DEV Community

Discussion on: Countdown Timer using HTML, CSS, and Javascript

divyamcm profile image
Divyamcm Author • Edited on

var offerDate = new Date('30 oct 2021')
Instead of the above format, you can use below format
new Date(year, month, day, hours, minutes, seconds, milliseconds) .
Ex: var offerDate = new Date(2021,09,16,09,20,0,0)

Set the values ten minutes ahead of current time to acheive 10 minutes countdown timer.