aspose file tools*
The moose likes GWT and the fly likes com.google.gwt.i18n.client.DateTimeFormat can parseStrict 2010/Jan/20 13:10:10 AM? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "com.google.gwt.i18n.client.DateTimeFormat can parseStrict 2010/Jan/20 13:10:10 AM?" Watch "com.google.gwt.i18n.client.DateTimeFormat can parseStrict 2010/Jan/20 13:10:10 AM?" New topic
Author

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

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
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

Joined: Jul 26, 2007
Posts: 9990
    
    7

What date do you get back?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
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!!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: com.google.gwt.i18n.client.DateTimeFormat can parseStrict 2010/Jan/20 13:10:10 AM?
 
Similar Threads
SQLGrammarException
hibernate env setup - oracledriver issue
adding more than one entry
some internal library in Hibernate logs even though logging is set to error.
How would i break this down into seperate metods?