the code is as follow:
DateTimeFormat df = DateTimeFormat.getFormat("yyyy/MM/dd hh:mm:ss
a");
try{
df.parseStrict("2010/Jan/20 13:10:59 AM");
}catch{IllegalArgumentException iae){
System.out.println("error");
}
As the datetimeformat is using hh, so according to api
h hour in am/pm (1-12) Number 12
H hour in day (0-23) Number 0
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?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.