calculating between two dates
Help please
I'm working (under Acrobat X)
I created a date feild called : "DG"
and another feild called "TP"
I have to calculate between different dates.
I would like "TP = DG + 39 weeks" in the form dd/mm/yyyy but i need so that the day stays the same.
exemple if DG : is 01/08/2019 the TP must be 01/05/2020 (in another way the month + 9 (month = 28 jours).
var sDate = this.getField("StartDate").value; // get date string var nWeeks = 39; // get or set the weeks to add var oDate = util.scand("dd/mm/yyyy", sDate); // convert to object oDate.setDate(oDate.getDate() + (7 * nWeeks) ); // add 7 days * number of weeks to date event.value = util.printd("dd/mm/yyyy", oDate); // format result
Help me please
