dateAddMonths
Returns date that results from adding pMonths months to pDate, as a string in “MM/DD/YYYY” format.
Version
1.4
Parameters
Parameter | Type | Description |
---|---|---|
pDate | string | Starting date, in format “MM/DD/YYYY” (or any string that converts to JS date). If null is used, td is the current date. |
pMonths | integer | Number of months to add to pDate. Use negative number (e.g. -12) to subtract months from td. |
Notes
If pDate is the last day of the month, the returned date is the last day of the month. If pDate is not the last day of the month, the new date has the same day of month, unless such a day doesn't exist in the new month (e.g. if baseDate is 1/30/2007 and the returned month is February), in which case the new date is the last day of the month.
Does not work if baseDate is wfDate. Returns NaN/NaN/NaN.