I need client machine date and time format which is set by usee in the javascript
for E.g :- if machine date is 02-12-2002 —> dd-mm-yyyy
02/12/2002 —> dd/mm/yyyy
also need to take care of the seperatot like ‘/’ , ‘.’ , ‘-‘ etc…
I don’t want the System-Locale like ‘en-IN’, ‘en-US’
I want the specific format
I have tried few approach like window.navigator and Intl.DateTimeFormat().resolvedOptions().locale but they returns the system locale not the date format
Samkit Sanghvi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.