Question about NSLocale with NSDateFormatter
Question about NSLocale with NSDateFormatter
- Subject: Question about NSLocale with NSDateFormatter
- From: Daniel Mischler <email@hidden>
- Date: Fri, 11 Nov 2005 00:34:16 +0100
I try to format a date using a locale which does not have to be the
user's locale.
In order to get something like "Freitag, 11. November 2005" I tried the
following:
NSDateFormatter* _formatter = [[NSDateFormatter alloc]
initWithDateFormat:@"%A, %e. %B %Y" allowNaturalLanguage:NO];
[_formatter setLocale:[[NSLocale alloc]
initWithLocaleIdentifier:@"de_CH"]];
NSLog(@"%@", [_formatter stringFromDate:[NSDate date]]);
The result is always: "Friday, 11. November 2005".
Where are things going wrong? Couldn't find anything in the
documentation that helped. Tried it with other locale identifiers too.
Thanks for your help
Daniel
______________________________________________________________________
amazing technologies
Chamerstrasse 56 phone: +41 41 7 123 654
6300 Zug email: email@hidden
_______________________________________________
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