Re: User Date Formatter (was Re: table column with <date value> null placeholder)
Re: User Date Formatter (was Re: table column with <date value> null placeholder)
- Subject: Re: User Date Formatter (was Re: table column with <date value> null placeholder)
- From: "Sean McBride" <email@hidden>
- Date: Mon, 9 May 2005 16:52:08 -0400
- Organization: Rogue Research
On 2005-05-09 15:08, glenn andreas said:
>Make a custom subclass of NSFormatter:
That is a nice workaround and all, but it's a real shame IB doesn't have
such a formatter by default (bug filed 4 years ago! <rdar://2803021>).
But IAC, I was talking about NSDate to NSString (not formatters).
Anyway, my point is simply is that it is MORE work to get a date string
in the user's format than not. The opposite was the case even back in
System 7, with the DateString() API, if you pass NULL as the intlHandle,
you get a localised date string.
With Cocoa, if I call description, descriptionWithCalendarFormat:,
descriptionWithCalendarFormat:locale:, descriptionWithCalendarFormat:
timeZone:locale:, or descriptionWithLocale: and pass nil's I do not get a
string in the user's format. Instead, I have to fetch from the defaults, etc.
And the result is apps that do not honour the user's settings, and
developers that don't even know it can be done (not to pick on you Eric!).
This is a pet peeve of mine.
So again, anyone know how to go from NSDate to NSString as easily as
System 7's DateString()?
--
____________________________________________________________
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