Re: AM/PM letter UNICODE issues
Re: AM/PM letter UNICODE issues
- Subject: Re: AM/PM letter UNICODE issues
- From: "A.M." <email@hidden>
- Date: Mon, 18 Oct 2010 14:48:03 -0400
On Oct 18, 2010, at 2:41 PM, glenn andreas wrote:
>
> 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.
In addition to this, some languages have no notion of individual characters or words, so trying to automatically abbreviate AMSymbol is a non-starter. The only way to accomplish this would be via localization.
Cheers,
M_______________________________________________
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