• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Determining user's clock preference on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining user's clock preference on iOS


  • Subject: Determining user's clock preference on iOS
  • From: Rick Mann <email@hidden>
  • Date: Wed, 22 Feb 2012 22:50:12 -0800

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."

If I could determine the user's preference, then I'd just format it appropriately. Alternatively, I can use the "short" format style, and then parse out the AM/PM, but that seems more fragile across locales (are there locales that use something other than "am" and "pm"?).

Any suggestions?

Thanks,
Rick


_______________________________________________

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


  • Follow-Ups:
    • Re: Determining user's clock preference on iOS
      • From: David Duncan <email@hidden>
    • Re: Determining user's clock preference on iOS
      • From: Nick Zitzmann <email@hidden>
    • Re: Determining user's clock preference on iOS
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: I added an exception breakpoint to my app...
  • Next by Date: Re: NSStepper - useless?
  • Previous by thread: Re: App Crashing in ARC !!
  • Next by thread: Re: Determining user's clock preference on iOS
  • Index(es):
    • Date
    • Thread