Skip navigation.
 
mlRe: NSDateFormatter question
FROM : Deborah Goldsmith
DATE : Fri Jul 04 01:10:54 2008

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_removed>

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 (<email_removed>)
>
> 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/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlNSDateFormatter question Chuck Soper Jul 3, 22:13
mlRe: NSDateFormatter question Deborah Goldsmith Jul 4, 01:10