> If you say
>
> new Date("07/32/2002")
>
> you will get back a date of August 1,2002(date object expects
> month first, then day).
or new Date(year, month-1, day)
> for example:
>
> var myDate=new Date("07/02/2002");
> var myDayOfMonth=myDate.getDate();
> myDate.setUTCDate(myDayOfMonth+30);
Since you use getDate() in the previous line, it's better to use setDate()
instead of setUTCDate(), or you'll have surprise :)
> alert(myDate.toDateString());
>
> will give you "Thu Aug 1 2002".
>
> If you want it in the original form, then for instance:
>
> myRealMonth=(myDate.getMonth()+1)%12; //for some unknown
> reason, months are zero-based
%2 doesn't seem to be really necessary, does it?