Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

com.google.gwt.i18n.client.DateTimeFormat can parseStrict 2010/Jan/20 13:10:10 AM?

 
peter tong
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the code is as follow:


As the datetimeformat is using hh, so according to api
parseStrict
h hour in am/pm (1-12)
so 13 AM should be error, but out of my expectation, the above code can pass!!
why?
any method to check the hour cannot over 12 if using AM/pm?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What date do you get back?
 
peter tong
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:What date do you get back?


I test in my home with the following code


the output is


no any exception thrown!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic