+ 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

16th Jul 2022, 10:35 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
14 Answers
+ 3
https://code.sololearn.com/WI5LM0lihaVH/?ref=app Try changing the dates and see.
17th Jul 2022, 3:23 PM
Rupan Samanta
Rupan Samanta - avatar
+ 3
When the countdown for this year expires, create a new date and set a new countdown
16th Jul 2022, 10:43 AM
Lisa
Lisa - avatar
+ 2
You check in your countdown function if the countdown is expired. If so, you update the year.
16th Jul 2022, 10:50 AM
Lisa
Lisa - avatar
+ 2
Get the current year via Javascript. The next year is the current year +1
16th Jul 2022, 10:58 AM
Lisa
Lisa - avatar
+ 1
But i need one countdown, who work automatically on next birth date....
16th Jul 2022, 10:46 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
16th Jul 2022, 10:49 AM
MATOVU CALEB
MATOVU CALEB - avatar
+ 1
But i don't neend every year updated countdown timer.....?
16th Jul 2022, 10:55 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 1
How its work automatically?
16th Jul 2022, 11:02 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 1
By writing Javascript code
16th Jul 2022, 11:11 AM
Lisa
Lisa - avatar
+ 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....
17th Jul 2022, 3:03 PM
Rupan Samanta
Rupan Samanta - avatar
+ 1
I can't speak English
18th Jul 2022, 4:43 AM
RAFFAEL
RAFFAEL - avatar
0
Can you please make a one example ?
16th Jul 2022, 11:12 AM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
0
Heo
16th Jul 2022, 9:11 PM
Sokeng Fossa
Sokeng Fossa - avatar
0
Please I am have problem
16th Jul 2022, 9:12 PM
Sokeng Fossa
Sokeng Fossa - avatar