Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
No, but you can make your own by creating some Date objects. Javascript provides a built-in Date object that gets the current date, or the date you have provided it. To create one, all you have to do is: var end_date = new Date("1/1/2021 12:00 AM"); You can then get the time in milliseconds from now to then by creating a new Date object without a parameter, and subtracting end_date from that date. After that, converting the number of milliseconds to days, hours, minutes, and seconds should be simple.
8th Jan 2020, 12:55 AM
Jianmin Chen
Jianmin Chen - avatar