date.addMonths()

date.addMonths()

The date.addMonths() API adds the number of months that are passed to the date.

Parameters


  • Numeric Value

Return Value


Date with specified number of months added.

RPG Equivalent


%MONTHS()

Examples


pjs.define("date", { type: 'date', initValue: '2017-01-01'}); // addMonths api date = date.addMonths(10) return date; //2017-11-01