Correct.

We're aware there is a need for what you want to do, but there is currently no way to do it. Please file an enhancement request.

Deborah Goldsmith
Apple Inc.
[EMAIL PROTECTED]

On Jul 3, 2008, at 1:13 PM, Chuck Soper wrote:

Hello,

Currently, I'm creating a NSDateFormatter instance as follows:
 dateFormatter = [[NSDateFormatter alloc] init];
 [dateFormatter setDateStyle:kCFDateFormatterMediumStyle];
 [dateFormatter setTimeZone:myTimeZone];

Assuming that the user hasn't modified their International formats using System Preferences (a fairly big assumption), then the following regions will use these formats (using [dateFormatter dateFormat]):
 United States:  MMM d, yyyy
 Belgium:        dd MMM yyyy
 Japan:          yyyy/MM/dd

Is there a way that I can add a day of week abbreviation and have to displayed correctly for all locales? For example, I'd like "Thu, Jul 3, 2008" for the United States and to have the day of week abbreviation added to the proper location (in the string) for other locales.

I'm fairly sure that what I'm trying to do is not possible or practical. I think that my only option is to specify a hard coded format string using setDateFormat: by referring to the following Date Format Patterns:
http://unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns
Of course, this approach would not be multi-locale compatible so I should avoid it.

In summary, if I want to have multi-locale compatible date formats, I should not attempt to add a day of week abbreviation. Instead, I should rely on kCFDateFormatterMediumStyle. Does this sound like the best approach?

Thanks,
Chuck

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/goldsmit%40apple.com

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to