Thursday, September 1, 2016

Re: CalenderUtil Date Math BUG - GWT 2.8 RC2

git tells me CalendarUtil.java is the same in 2.7 and 2.8RC2. So yes, the code should behave the same.

But the above behaviour is not wrong because it's standard Java behaviour.

Whether you use Date.setMonth(n) or Calendar.set(Calendar.MONTH, n) Java behaves the same way. That is, if you start on August 31, and set the month to September, then you find you are on October 1.


On Thu, Sep 1, 2016 at 10:01 AM, Daniel Kurka <kurka.daniel@gmail.com> wrote:
Does this code do the same thing in 2.7?

On Wed, Aug 31, 2016 at 11:41 PM Paul Robinson <ukcueman@gmail.com> wrote:

You don't say what part of this you think is a bug. I presume it's the fact that Aug 31 plus one month is Oct 1. If so, this is not a bug.

Adding one month should do literally that, so you get September 31. But there are only 30 days in September, so this automatically becomes October 1.

Paul

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment