Re: NSDatePicker display format
Re: NSDatePicker display format
- Subject: Re: NSDatePicker display format
- From: じょいすじょん via Cocoa-dev <email@hidden>
- Date: Wed, 22 Jan 2020 12:25:23 +0900
Have you tried any of the properties like calendar (NSCalendar), locale
(NSLocale) and timeZone (NSTimeZone) ?
Those are what drive much of NSDateFormatter…
By default they probably inherit from the current system settings or whatever
the app inherits at launch.
Date, time and number formats are generally provided defaults as part of locale
and calendar in Cocoa and largely via the underlying Unicode CLDR and ICU
standard open source libraries.
But when you need to provide something that differs from the current user's
system preferences settings, you can do so.
Example, a locale based on en-US would likely have the Month Day Year
convention so common in everyday life in the USA.
However, some contexts in the USA use other formats, in such cases, your app
might want to provide that.
> On Jan 22, 2020, at 11:22, Marco S Hyman via Cocoa-dev
> <email@hidden> wrote:
>
> On Jan 21, 2020, at 3:04 PM, email@hidden wrote:
>>
>> Have you tried adding a NSDateFormatter to the DatePickerCell (in code or in
>> the xib) and setting its format string to what you want?
>
> There doesn’t seem to be any way to get the DatePickerCell to use the
> formatter. At least not one that I’ve yet to find. Bummer.
>
> Marc
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden