Adds months to a date.
A new date.
|Date||A date in OI internal format. (REQUIRED)|
|Months||The number of months to add. (REQUIRED)|
The "AddMonths" service calculates a new date by adding the given number of months to an existing date. You can pass whole numbers or decimal numbers. You can also pass negative values to subtract months.
Note that months are an abstract concept, so adding months is also done abstractly. If the current month is February 28, and you add 1 whole month, you will get March 28. In other words, whole months are added without altering the day of the month, unless the day would be invalid. As an example, If you add 1 whole month to January 31, you'll get February 28. Fractions of a month are calculated using the average month length, which is 30.4375. For example, if you add 1.5 months to February 28, you'll get April 12th, which is 15 days (half of 30.4375) after March 28th.