NSDateFormatter problem using NSShortDateFormatString
NSDateFormatter problem using NSShortDateFormatString
- Subject: NSDateFormatter problem using NSShortDateFormatString
- From: Will Cosgrove <email@hidden>
- Date: Fri, 13 Sep 2002 14:32:08 -0500
Hi All,
I have, what would seem to be, a simple question. I would like to set
up a date formatter that uses the correct short date format from the
International Prefs settings so I don't *inflict* the US date format on
UK users for example. I'm trying to use NSShortDateFormatString and
pass that into my formatter like so:
NSString *format
NSDateFormatter *formatter;
format = [[NSUserDefaults standardUserDefaults]
stringForKey:NSShortDateFormatString];
formatter = [[NSDateFormatter alloc] initWithDateFormat:format
allowNaturalLanguage:NO];
//attach to editfield
[icValueField setFormatter: formatter];
However, this absolutely doesn't work. It never accepts any input as
valid. Does anyone know how I can get this working, I'm at a loss. It
seems the format string is malformed or something like that.
Thanks in advance,
Will C.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.