Re: Thoroughly confused on date formatting
Re: Thoroughly confused on date formatting
- Subject: Re: Thoroughly confused on date formatting
- From: "Sean McBride" <email@hidden>
- Date: Fri, 29 Sep 2006 12:00:09 -0400
- Organization: Rogue Research
On 2006-09-28 22:06, Mike Abdullah said:
>I want the user's preferred format, but without any sort of seconds
>setting, regardless of whether the user's settings specify seconds or
>not.
Isn't that exactly what NSDateFormatterShortStyle is? Docs say
"Specifies a short style, typically numeric only, such as "11/23/37" or
"3:30pm"." I don't see any seconds there. Compared with
NSDateFormatterLongStyle "Specifies a long style, typically with full
text, such as "November 23, 1937" or "3:30:32pm"."
The part about "The format for these date and time styles is not exact
because they depend on the locale, user preference settings, and the
operating system version. Do not use these constants if you want an
exact format." Means "don't expect to get the same format everywhere
everytime" since it changes based on user prefs. So you wouldn't want
to save to a data file using this format, since then you might not be
able to open it from a different computer with different prefs.
Can't you use NSDatePicker? Do you need 10.3 support? Maybe use
WBTimeControl?
--
____________________________________________________________
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