Re: NSPredicateEditor's date picker doesn't use user's date format
Re: NSPredicateEditor's date picker doesn't use user's date format
- Subject: Re: NSPredicateEditor's date picker doesn't use user's date format
- From: Steve Mills <email@hidden>
- Date: Fri, 20 Feb 2015 14:56:40 -0600
Oops, we lost the cocoa list for a message or two. Re-adding.
> On Feb 20, 2015, at 14:28:12, Shane Stanley <email@hidden> wrote:
>
> On 20 Feb 2015, at 7:13 pm, Steve Mills <email@hidden> wrote:
>>
>> But why isn't it already set up to use the correct format like every other place where a date is formatted?
>>
>> NSString* fmt = [NSDateFormatter dateFormatFromTemplate:@"yyyy/MM/dd" options:0 locale:[NSLocale currentLocale]];
>>
>> -->MM/dd/yyyy
>>
>> Bwuh?
>
> How do you define "correct"? What if you set your system short format to yyyy/MMM/dd?
>
> As I understand it, the method just reorders the values according to the values for the supplied locale. user settings are therefore irrelevant.
Yes, it should be using the order that's defined in the locale, and according to the docs for currentLocale, it should be using *my custom settings as defined in System Prefs*:
"The logical locale for the current user. The locale is formed from the settings for the current user’s chosen system locale overlaid with any custom settings the user has specified."
Regardless of whether or not it can be changed programmatically, it's still a bug that it doesn't default to the user's display format. I'm writing up a bug.
--
Steve Mills
Drummer, Mac geek
_______________________________________________
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