• 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
Re: AM/PM letter UNICODE issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AM/PM letter UNICODE issues


  • Subject: Re: AM/PM letter UNICODE issues
  • From: glenn andreas <email@hidden>
  • Date: Mon, 18 Oct 2010 13:41:52 -0500

On Oct 18, 2010, at 12:19 PM, Alex Kac wrote:

> I'm fairly certain my problem here is that I wasn't thinking about unicode terms here.
>
> What we are trying to do:
> Shorten the AM/PM to just the first character in Western Languages so that a time is shown as "1:30a".
>
> 	NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
> 	NSString* am = [[[formatter AMSymbol] substringToIndex:1] lowercaseString];
> 	NSString* pm = [[[formatter PMSymbol] substringToIndex:1] lowercaseString];
>
>
> This works in Western languages just fine.

Not sure that this is even true - in Germany, time is displayed normally using a "24 hour" notation (no AM/PM), and this true in many other locations as well.  See <http://en.wikipedia.org/wiki/Date_and_time_notation_by_country> for all sorts of other gory details and special cases.  Even for US cases, there are people who set their time format to use 24 hour time and so would expect to see "13:00" and not "1:00p".

Bottom line is trying to display time in a non-standard format is going to be problematic and have support issues.


Glenn Andreas                      email@hidden
The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL

_______________________________________________

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: AM/PM letter UNICODE issues
      • From: Alex Kac <email@hidden>
    • Re: AM/PM letter UNICODE issues
      • From: "A.M." <email@hidden>
References: 
 >AM/PM letter UNICODE issues (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: NSDictionary allValues not mutable
  • Next by Date: Re: NSDictionary allValues not mutable
  • Previous by thread: AM/PM letter UNICODE issues
  • Next by thread: Re: AM/PM letter UNICODE issues
  • Index(es):
    • Date
    • Thread