Skip to content

mwrf/jsdatelocaleformat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

jsdatelocaleformat

Javascript function to return the correct Locale format for a given Locale string

Javascript provides no way to fetch a Date format string for the user's language in a browser.
This function uses navigator.language to return a Date format mask that you can use to correctly display dates in your web application.

I do not know of a reliable source for this data, so please send PRs if you believe something to be incorrect.

Original Question: https://stackoverflow.com/questions/2388115/get-locale-short-date-format-using-javascript/9893752

About

Javascript function to return the correct Locale format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published