I am assuming you are using a date picker but it is no real problem if you are not, if you use the code below then the Date object will cope with all the leap years and such.
// this is where I get the date from ( a standard date picker)
var myDate = this.getField("Date3_af_date").valueAsString;
// I make the string an actual date
var myDateValue = new Date ( myDate);
// get the years and add 10
myDateYears = myDateValue.getFullYear() + 10;
// get the months
myDateMonths = myDateValue.getMonth();
// get the days
myDateDays = myDateValue.getDate();
// using the values above, create a new date, this should automatically deal with leap years and such
var myDate = new Date ( myDateYears, myDateMonths, myDateDays);
// put the returned value into a text field to see.
this.getField("Text4").value = myDate.toString();