Getting client side regional settings date format

Discussion in 'ASP .Net' started by =?Utf-8?B?b3B0aWNzdG9ybQ==?=, Jul 12, 2005.

  1. 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
    =?Utf-8?B?b3B0aWNzdG9ybQ==?=, Jul 12, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?b3B0aWNzdG9ybQ==?=

    Mark Rae Guest

    "opticstorm" <> wrote in message
    news:...

    >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
    Mark Rae, Jul 12, 2005
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > "opticstorm" <> wrote in message
    > news:...
    >
    >>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
    >
    Juan T. Llibre, Jul 12, 2005
    #3
  4. =?Utf-8?B?b3B0aWNzdG9ybQ==?=

    Mark Rae Guest

    Mark Rae, Jul 12, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Phil
    Replies:
    0
    Views:
    588
  2. =?Utf-8?B?RGF2aWQgTGVlIEFV?=

    Setting date format, regional settings for ASP.NET

    =?Utf-8?B?RGF2aWQgTGVlIEFV?=, Jun 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,744
    =?Utf-8?B?RGF2aWQgTGVlIEFV?=
    Jun 15, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: Setting date format, regional settings for ASP.NET

    Phil Winstanley [Microsoft MVP ASP.NET], Jun 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    465
    Phil Winstanley [Microsoft MVP ASP.NET]
    Jun 15, 2004
  4. David Lee AU
    Replies:
    1
    Views:
    203
    Aaron [SQL Server MVP]
    Jun 15, 2004
  5. Laurence Neville
    Replies:
    1
    Views:
    357
    Amiram Korach
    Dec 15, 2004
Loading...

Share This Page