Re: Determining user's clock preference on iOS
Re: Determining user's clock preference on iOS
- Subject: Re: Determining user's clock preference on iOS
- From: Kyle Sluder <email@hidden>
- Date: Thu, 23 Feb 2012 08:21:11 -0800
On Feb 22, 2012, at 10:50 PM, Rick Mann <email@hidden> wrote:
> I have a need to format times as either
>
> 24:mm
>
> or
>
> 12:mm
> am
>
> That is, if the user prefers a 24-hour clock, I want it to appear on a single line. If the user prefers a 12-hour clock, I want the AM/PM designator to be rendered underneath the time (in smaller type).
>
> Unfortunately, there's no format specifier for the hours of the day that indicates "use the user's preferred format."
What happens if you give +[NSDateFormatter dateFormatFromTemplate:options:locale:] a template that contains "h:m:s a"? Does it rewrite it to "H:m:s" if the current locale uses 24-hour time?
--Kyle Sluder
_______________________________________________
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