Announcement

Collapse
No announcement yet.

today.toLocaleString format doesn't match Locale setting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • today.toLocaleString format doesn't match Locale setting

    When I run the following code:
    today = new Date( );
    debugPrint(today.toLocaleString( ) + "\n");

    I get the following output:
    Saturday, September 05, 2009 02:28:46


    However, in the Windows XP 'Regional and Language' Control panel:
    - The 'Short Date' is set to - "dd/MMM/yyyy" (05/Sep/2009)
    - The 'Long Date' is set to - "d MMMM yyyy" (5 September 2009)

    The Core Java Reference v1.5 says the output SHOULD be controlled/determined by this Control Panel.


    Can anyone tell me why the output is NEITHER of these formats, or what I need to do to GET the formats specified in the relevant Windows Control Panel???


    Thanks in advance.
Working...
X