Sorry,

I should have post this message in the flex users list.

The problem seems to be due to the fact that the day is not set initially.
So the runtime uses the system current date (March 31). But as april has
only 30 days, when setMonth(3) is executed, the date is automatically set to 
may...

So it seems to be be a very bad idea to build a date like I did :

var myDate:Date = new Date();
                                
myDate.setFullYear(year);
myDate.setMonth(month);
myDate.setDate(day);

Instead of :

var myDate:Date = new Date(year, month, day);






--
View this message in context: 
http://apache-flex-development.2333347.n4.nabble.com/Strange-behavior-with-setMonth-method-of-Date-object-tp36525p36527.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to