• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Localized Date Formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localized Date Formatting


  • Subject: Localized Date Formatting
  • From: Johan Henselmans <email@hidden>
  • Date: Fri, 18 Nov 2005 10:22:33 +0100


I am trying to get localized date formatting to work.

My first Idea was to use the browser accept-language to format the data, but I am already stuck before that:

How do I get the localized data format?

I tried this one, which should work according to the Class definition
NSTimestampFormatter dateTimeFormatter = new NSTimestampFormatter ( "%A %e %B %Y", new Locale("DUTCH"));
return dateTimeFormatter.format(perfDate());


That did not work, it could not resolve the symbol:
Trainingdata.java:45: cannot resolve symbol
symbol : constructor NSTimestampFormatter (java.lang.String,java.util.Locale)


Then I tried the code from Chuck's book on localized Date Formatting:

java.text.SimpleDateFormat aFormat = new java.text.SimpleDateFormat ("EEEE,d MMMM yyyy", new Locale("Dutch"));
return aFormat.format(perfDate());


This one returns the english date format.

What is even more interesting: in Mozilla (set to Dutch Accept- Language, to compare)

the date format is: Wed 28 Dec 2005 20:30 uur:

In Safari the date format is: Wednesday,28 December 2005

Anyone that can shed light on this subject?


Best Regards,

Johan Henselmans


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Localized Date Formatting
      • From: Francis Labrie <email@hidden>
  • Prev by Date: Re: Access to running WO app via network
  • Next by Date: Re: Access to running WO app via network
  • Previous by thread: Re: Access to running WO app via network
  • Next by thread: Re: Localized Date Formatting
  • Index(es):
    • Date
    • Thread