• 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
Re: International date formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: International date formatting


  • Subject: Re: International date formatting
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 20 May 2005 14:38:03 -0400
  • Organization: Rogue Research

On 2005-05-20 18:30, Frederick Cheung said:

>> I'm new to Cocoa internationalization. Is there a way to format an
>> NSDate according to the current locale so that it displays the
>> weekday, full month name, and date but no year? In other words, in
>> US English I want:
>>
>>     Thursday, May 19
>>
>> In French from France, this would be (I think):
>>
>>     vendredi 19 mai
>>
>>
>How about the CFDateFormatter stuff, in particular
>CFDateFormatterSetFormat allows you to create pretty much any date
>format you want.

Well, I don't know much about CFDateFormatter, but the
CFDateFormatterSetFormat() doc shows that you have to pass it a format
string. So you could pass it something like "%A, %B %e" or "%A %e %B",
but then you're back to the problem of user settings.  How do you know
which order to use?  Do you include the comma or not?  This is why I
suggest starting from NSDateFormatString and yanking out the year bit.
Its not ideal I agree.  Maybe 10.4 has something better?

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


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

This email sent to email@hidden

  • Follow-Ups:
    • Re: International date formatting
      • From: Andreas Mayer <email@hidden>
References: 
 >International date formatting (From: Ben Kazez <email@hidden>)
 >Re: International date formatting (From: Frederick Cheung <email@hidden>)

  • Prev by Date: Re: Getting the NSDateFormatter strings from the user's preferences
  • Next by Date: AddressBook-like TextFields?
  • Previous by thread: Re: International date formatting
  • Next by thread: Re: International date formatting
  • Index(es):
    • Date
    • Thread