We need to get client system date and time format. At present in our application we have requirement when user login into the application they have to see the date and time format as his local PC date and time format setting.
For example, he is accessing the site form the then he able to see exact his local system date and time format instead of server format.
We tried this approach by using date.toLocaleDateString()
, but this is returning the current local system date instead of format. Even date.toLocalDateString()
is behaving differently in different browsers.
How do I get exact customize date and time format of client system?
Example: like (dd/MM/yyyy hh:mm
, MM/dd/yyyy hh:mm
and so on).
What I'm expecting: