03-09-2012 07:33 AM
I use http://www.blackberry.com/developers/docs/7.1.0api
I got a bug report that a device on English(UK) has a glitch where the time goes off the screen, and i was able to reproduce that on both device and simulator.
This is the pattern string i use: hh:mma
(2 digits hour, colon, 2 digits minute, and a single letter for 'a' or 'p')
On English or English(US) i get the desired result, for example '12:12p'
On English(UK) i get two letters for the a/p marker, for example '12:12pm'
(as if i had used 'hh:mmaa' ).
Is this the desired behavior? My customer does not like it and wants a single look and feel, with only one letter for 'a' or 'p', and i am somewhat hesitatant to use aubstring...
Solved! Go to Solution.
03-09-2012 08:53 AM
According to the docs, the SimpleDateFormat works in a 'locale-sensitive manner' so it looks like it works correctly.
If you don't want to use substring, you might want to consider extending DateFormat or SimpleDateFormat and returning the desired format regardless of the locale.
Hope that helps,
03-09-2012 09:00 AM
03-09-2012 09:37 AM
To be honest, I am surprised that you get a instead of am, even in the US. In my opinion, here in the UK anyway, people would be confused with just an a or a p, they expect am and pm.
I get round this issue by giving people the 24 hour time.....
03-09-2012 09:42 AM