Friday, February 3, 2012

Re: com.google.gwt.i18n.client.DateTimeFormat parseStrict problem

So is this a bug?

Sent from my iPhone

On 2012/2/4, at 上午7:41, Patrick Tucker <tuckerpmt@gmail.com> wrote:

> Interesting, "MM" should also not be happy about "Jan"...
>
> On Feb 3, 4:12 am, tong123123 <tong123...@gmail.com> wrote:
>> 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 google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate