Personally I would use a library like date-fns for this.
Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.
Getting started with webpack - Tutorial for absolute beginners
3 projects | dev.to | 21 Nov 2022
I made a digital clock, everything is working fine but the meridiem isn't changing, can anyone help?
Need to calculate time passed between two dates HELP!
Angular crash on iOS devices toLocaleDateString()
1 project | dev.to | 2 Sep 2022
Build a full-stack app with Next.js and Supabase
2 projects | dev.to | 25 Aug 2022