469,645 Members | 1,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

Getting client side regional settings date format

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
Nov 19 '05 #1
3 3392
"opticstorm" <op********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
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?sourcei...r+userLanguage
Nov 19 '05 #2
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.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:eT**************@TK2MSFTNGP12.phx.gbl...
"opticstorm" <op********@discussions.microsoft.com> wrote in message
news:CC**********************************@microsof t.com...
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?sourcei...r+userLanguage

Nov 19 '05 #3
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
2. The Accept Language may not be the same as the
machine's setting for date and time formats.


Yes indeed - http://west-wind.com/weblog/posts/334.aspx
Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.