CalendarUtil - Unusual Calculation

2010-12-01 Thread Ramon Buckland
Hi Before I log a bug, I just want to check I am not missing something regarding the CalendarUtil. I have a simple use case that is proving to show an unexpected result. In Eclipse, open up a Scrapbook page and copy the following code in and run it. java.util.Date calcDate = new

Re: CalendarUtil - Unusual Calculation

2010-12-01 Thread Ramon Buckland
So the problem won't be inside the CalendarUtil. Simply put, the following show the same result. java.util.Date date = new java.util.Date(2010 -1900,12-1,31); System.out.println(date.toString()); date.setMonth(8); System.out.println(date.toString()); (I am thinking timezones etc etc..

Re: CalendarUtil - Unusual Calculation

2010-12-01 Thread Ramon Buckland
Ignore this thread :-) I found my answer /** * Testing to that if we set the day number to 31 for a month that only has 30 * days in it, that the date rolls over to the first day of the next month in * sequence. On Dec 1, 11:08 am, Ramon Buckland ra...@thebuckland.com wrote: So the