1 Reply Latest reply on Nov 27, 2010 9:30 AM by Luis Pedro Ferreira

    Adding days to a date object

    Luis Pedro Ferreira

      Hi all.

      I realy tryed to look for this in the forum but since it's so difficult to find anything here i decided to open a new discussion about this.

       

      I'm having problems adding a day to a certain date. I tried everything, but prob not the right code.

      Anyway...let's go to the point.

       

      myDate:Date = new Date(20, 11, 2011)

       

      myDate.getDate() // output: 20

      myDate.getMonth() // output: 11

      myDate.getFullYear() // output: 2011

       

      Now i tried everythink i know to add, for example, 10 days:

       

      One of the attempts:

      myDate.getDate()+1

      myDate.getDate// output: 12

      myDate.getMonth() // output: 0 (Zero)

      myDate=getFulYear() // output: 2011

       

      I'm sure someone already made something like this.

      If you are one of those persons please please help me