8 Replies Latest reply on Jun 10, 2007 11:30 PM by chris.huston.t10

    BUG in Date class???

    marcusmattingly
      I either found a bug or I am seriously missing something. Check out this code:


      const MS_PER_DAY:Number = 1000 * 60 * 60 * 24;

      var testDate:Date = new Date(2007,10,4);

      testDate.setTime(testDate.getTime() + MS_PER_DAY);

      mx.controls.Alert.show(testDate.toDateString());


      The alert box shows the original date!!

      Strange thing is that if I change the year to 2006, it works.

      Anybody?

      Marcus