Re: International date formatting
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