How to know if Locale/system is using 12 or 24 hours format in JavaScript without using any 3rd Party Libraries ?
Asked
Active
Viewed 300 times
2 Answers
-1
You can use toLocaleTimeString method.
let date = new Date();
date.toLocateTimeString()

Amit
- 3,662
- 2
- 26
- 34