i have a project with reactjs and in this project I want create a countdown and in my project i want when ever a user came to my site I showing that user a count down from The moment the user enters the page until 00:00:00 (12:00:00 AM). i try implement this with javaScript and Date class but I can't find a solution for this problem.in other word i want a time stamp from the moment user enters the page until (00:00:00) (ex:a user enter the page at 11:00:00 i want this timestamp be between 11:00:00AM and 00:00:00)
I would suggest moment.js package. It's very well documented and it can do pretty cool stuff. I'm sure it would solve your need. Here is a link to moment.js