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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to