wood burning stoves*
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
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: 10523
    
    9

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!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: com.google.gwt.i18n.client.DateTimeFormat can parseStrict 2010/Jan/20 13:10:10 AM?