+ 3
I want to make a birthday countdown.
If i add a date like a 25 December 1998 in countdown. It will show me live timer like a Years, months, weeks, days, hours, minutes, seconds, milliseconds etc. In live 00123 minutes.. 00124 minutes.. 00125 minutes.. etc 00123 seconds.. 00124 seconds.. 00125 seconds.. etc live timer. If today date is 24 December 2022, it will show me 0 years 0 months 0 weeks 0 hours 10 minutes 20 seconds... etc. After date expired it will show me 0 year 11 months 29, 30, or 31 days Hours mints secds etc. I mean don't stop this count down after date expiry.... it will show me next year birthday date and time in years months weeks days hr min scd etc. https://code.sololearn.com/WTjJ0FZmvP19/?ref=app
14 ответов
+ 3
https://code.sololearn.com/WI5LM0lihaVH/?ref=app
Try changing the dates and see.
+ 3
When the countdown for this year expires, create a new date and set a new countdown
+ 2
You check in your countdown function if the countdown is expired. If so, you update the year.
+ 2
Get the current year via Javascript. The next year is the current year +1
+ 1
But i need one countdown, who work automatically on next birth date....
+ 1
But i don't neend every year updated countdown timer.....?
+ 1
How its work automatically?
+ 1
By writing Javascript code
+ 1
If I am not wrong, you want a timer that will update time left for next birthday right?
If yes then increment the year in if(){} block it will go on....
+ 1
I can't speak English
0
Can you please make a one example ?
0
Heo
0
Please I am have problem