Sandor, just to let you know, all I did was go into the Date & Time System
Preference, and do the following:
Set the Time options to
- Use a 24 hour clock
- Open ~/Library/Preferences/com.apple.menuextra.clock.plist
- Copy and paste the contents into the email.
Set the Ti
Alex,
This is interesting, and thanks for digging it up.
Using this plist it appears that I could use [[NSUserDefaults
standardUserDefaults] addSuiteNamed:@"com.apple.menuextra.clock"] and access
this data with the key 'DateFormat'. I'm not sure I want to do this. I expect
there is a degree
Jeremy,
> On Jan 4, 2017, at 08:56, Jeremy Pereira wrote:
>
>
>> On 3 Jan 2017, at 16:34, Sandor Szatmari
>> wrote:
>>
>> Jeremy,
>>
>>> On Jan 3, 2017, at 10:30, Jeremy Pereira
>>> wrote:
>>>
>>>
>>>
>>> It seems obvious to me that method 1 only refers to the clock display in
>
> On 3 Jan 2017, at 16:34, Sandor Szatmari wrote:
>
> Jeremy,
>
>> On Jan 3, 2017, at 10:30, Jeremy Pereira
>> wrote:
>>
>>
>>>
>>
>> It seems obvious to me that method 1 only refers to the clock display in the
>> menu bar and nothing else. It’s a sub setting of
>> “Show date and time i
OK. All that NSLocale stuff seemed like "The right way to do it™" but…
Let's see if this gets you what you want.
Read this file:
~/Library/Preferences/
com.apple.menuextra.clock.plist
And you'll see…
http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
EEE h:mm
Or
http://www.apple.com/DT
On Jan 3, 2017, at 8:02 PM, Sandor Szatmari wrote:
> Alex,
>
> On Jan 3, 2017, at 19:51, Alex Zavatone wrote:
>
>>
>> On Jan 3, 2017, at 3:02 PM, Sandor Szatmari wrote:
>>
>>> Gary,
>>>
On Jan 3, 2017, at 14:52, Gary L. Wade
wrote:
Is there a problem with using +[NSDa
Alex,
> On Jan 3, 2017, at 19:51, Alex Zavatone wrote:
>
>
>> On Jan 3, 2017, at 3:02 PM, Sandor Szatmari wrote:
>>
>> Gary,
>>
>>> On Jan 3, 2017, at 14:52, Gary L. Wade wrote:
>>>
>>> Is there a problem with using +[NSDateFormatter
>>> localizedStringFromDate:dateStyle:timeStyle:]? Depen
On Jan 3, 2017, at 3:02 PM, Sandor Szatmari wrote:
> Gary,
>
>> On Jan 3, 2017, at 14:52, Gary L. Wade wrote:
>>
>> Is there a problem with using +[NSDateFormatter
>> localizedStringFromDate:dateStyle:timeStyle:]? Depending on your needs, you
>> might also consider +[NSCalendar autoupdating
In that case, see if a call like this would work for you in all supported
locales:
Objective-C
formattedDate = [NSDateFormatter localizedStringFromDate:date
dateStyle:NSDateFormatterNoStyle
timeStyle:NSDateFormatterShortStyle];
or:
Swift
let formattedDate = DateFormatter.localizedString
Gary,
> On Jan 3, 2017, at 18:40, Gary L. Wade wrote:
>
> What I’m getting at is how relevant is it to your app that you know if and
> where the time-of-day indicators exist in addition to the 24-hour setting.
> Answering those questions should be what determines your next steps.
> As menti
What I’m getting at is how relevant is it to your app that you know if and
where the time-of-day indicators exist in addition to the 24-hour setting.
Answering those questions should be what determines your next steps. As
mentioned, the alarm clock has a long history on the Mac whereas the Uni
Sean,
> On Jan 3, 2017, at 15:32, Sean McBride wrote:
>
> On Tue, 3 Jan 2017 11:26:48 -0500, Sandor Szatmari said:
>
>> What I was asking for clarity on is the fact that there is no way to
>> detect that the user prefers 24 hr time display if they only choose
>> method 1, the Date & Time checkb
Gary,
> On Jan 3, 2017, at 14:52, Gary L. Wade wrote:
>
> Is there a problem with using +[NSDateFormatter
> localizedStringFromDate:dateStyle:timeStyle:]? Depending on your needs, you
> might also consider +[NSCalendar autoupdatingCurrentCalendar].
I am looking for detecting whether or not t
On Tue, 3 Jan 2017 11:26:48 -0500, Sandor Szatmari said:
>What I was asking for clarity on is the fact that there is no way to
>detect that the user prefers 24 hr time display if they only choose
>method 1, the Date & Time checkbox. Should I allow my users to set 12
>hr time but override it to 24
Quincey,
> On Jan 3, 2017, at 14:46, Quincey Morris
> wrote:
>
>> On Jan 3, 2017, at 05:00 , Sandor Szatmari
>> wrote:
>>
>> Are you suggesting case sensitivity is an issue here? If so, I don't think
>> so. The template returned from this method uses 'a' as a place holder for
>> AM/PM.
Is there a problem with using +[NSDateFormatter
localizedStringFromDate:dateStyle:timeStyle:]? Depending on your needs, you
might also consider +[NSCalendar autoupdatingCurrentCalendar].
A user typically “sets” their region settings when they set up their Mac, and
the choice of 12/24 hour disp
On Jan 3, 2017, at 05:00 , Sandor Szatmari wrote:
>
> Are you suggesting case sensitivity is an issue here? If so, I don't think
> so. The template returned from this method uses 'a' as a place holder for
> AM/PM. e.g. It might return the string 'h a' as it does by default for the
> English
Alex,
> On Jan 3, 2017, at 13:47, Alex Zavatone wrote:
>
> iOS or Mac?
>
> In any case, this will help you out to no end.
>
> http://NSDateformatter.com/
Thanks, I'll check this out.
>
> And note that the case of the letters you use in your formatter matter.
I don't think I said case doesn'
iOS or Mac?
In any case, this will help you out to no end.
http://NSDateformatter.com/
And note that the case of the letters you use in your formatter matter.
GL.
- Alex Zavatone
On Jan 3, 2017, at 12:16 AM, Sandor Szatmari wrote:
> I am working on a small application where the primary funct
Steve,
> On Jan 3, 2017, at 12:28, Steve Christensen wrote:
>
>> On Jan 3, 2017, at 8:26 AM, Sandor Szatmari
>> wrote:
>>
>> Steve,
>>
>>> On Jan 3, 2017, at 10:17, Steve Christensen wrote:
>>>
>>> In the Date & Time preference panel, I assume that you're referring to the
>>> option on th
On Jan 3, 2017, at 8:26 AM, Sandor Szatmari
wrote:
>
> Steve,
>
>> On Jan 3, 2017, at 10:17, Steve Christensen wrote:
>>
>> In the Date & Time preference panel, I assume that you're referring to the
>> option on the Clock tab. If so, those settings refer only to the menubar
>> clock display
Jeremy,
> On Jan 3, 2017, at 10:30, Jeremy Pereira
> wrote:
>
>
>> On 3 Jan 2017, at 06:16, Sandor Szatmari
>> wrote:
>>
>> I am working on a small application where the primary function is to display
>> the time to the user. My hope was to honor the user's preference setting.
>> I am e
Steve,
> On Jan 3, 2017, at 10:17, Steve Christensen wrote:
>
> In the Date & Time preference panel, I assume that you're referring to the
> option on the Clock tab. If so, those settings refer only to the menubar
> clock display.
I just think it's weird that there are two checkboxes. It seem
In the Date & Time preference panel, I assume that you're referring to the
option on the Clock tab. If so, those settings refer only to the menubar clock
display.
If you notice in that same preference panel, on the Date & Time tab, there is a
message at the bottom that says, "To set date and ti
Quincy,
Sandor
> On Jan 3, 2017, at 04:35, Quincey Morris
> wrote:
>
>> On Jan 2, 2017, at 22:16 , Sandor Szatmari
>> wrote:
>>
>> There are supported methods using: (works with method 2)
>>NSString *format = [NSDateFormatter dateFormatFromTemplate:@"j" options:0
>> locale:[NSLocale c
On Jan 2, 2017, at 22:16 , Sandor Szatmari wrote:
>
> There are supported methods using: (works with method 2)
>NSString *format = [NSDateFormatter dateFormatFromTemplate:@"j" options:0
> locale:[NSLocale currentLocale]];
>BOOL is24Hour = ([format rangeOfString:@"a"].location == NSNotFou
I am working on a small application where the primary function is to display
the time to the user. My hope was to honor the user's preference setting. I
am either missing something or honoring the user's preference is harder than
expected.
So, there are two places to set 24 hr time display.
27 matches
Mail list logo