Re: table column with <date value> null placeholder
Re: table column with <date value> null placeholder
- Subject: Re: table column with <date value> null placeholder
- From: "Sean McBride" <email@hidden>
- Date: Mon, 9 May 2005 15:42:11 -0400
- Organization: Rogue Research
On 2005-05-06 17:06, Eric Friedman said:
>Sean, I'm interested in your comment about date format as a user
>preference. Of course Interface Builder's formatter wants me to
>choose exactly one format string.
Yes, quite annoying.
>I suppose what you say could be
>done through user preferences, but I'm curious -- do a lot of folks go
>to this trouble?
Lots do, lots don't; but you should. ;)
This snippit will get you started:
NSString* sdf = [[NSUserDefaults standardUserDefaults] stringForKey:
NSDateFormatString];
NSDictionary* locale = [[NSUserDefaults standardUserDefaults]
dictionaryRepresentation];
[aDate descriptionWithCalendarFormat:sdf locale:locale];
Sadly, passing nil's to descriptionWithCalendarFormat does not get you
localised date strings.
I would LOVE for someone to point out an easier way to get a localised,
in-the-user's-format string from an NSDate.
--
____________________________________________________________
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