Getting client side regional settings date format

G

Guest

i want to know is that is it possible to get a web clients date format i.e.
like (DD/MM/YY) or (YYYY/MM/DD) from asp.net. or any other client scripting
languages
like jscript,javascript. no perl please.
if so then how. please reply
 
M

Mark Rae

i want to know is that is it possible to get a web clients date format i.e.
like (DD/MM/YY) or (YYYY/MM/DD) from asp.net. or any other client
scripting
languages
like jscript,javascript. no perl please.
if so then how. please reply

You might be able to do something with navigator.systemLanguage and/or
navigator.userLanguage - e.g. on my system, both return "en-gb", so you
could logically work out that my PC is set up with British English settings
and go from there...

http://www.google.com/search?source...ript+navigator+systemLanguage+or+userLanguage
 
J

Juan T. Llibre

Request.UserLanguages would come in handy if you want to
detect a browser's Accept Language with a .Net class.

Two warnings :

1. Request.UserLanguages returns an Array
Process it accordingly.

2. The Accept Language may not be the same as the
machine's setting for date and time formats.

I know so, because on my test machine and web server they are not.

However, for 99% ( guesstimate ) of clients out there, they would be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top