Add months
- Last Updated: October 26, 2026
- 1 minute read
- Corticon.js
- Version 2.4
- Documentation
SYNTAX
<DateTime>.addMonths(<Integer>)
<Date>.addMonths(<Integer>)
Adds the number of months in <Integer> to the number of months in <DateTime> or <Date>.
The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.
This sample Rulesheet uses .addMonths in a Nonconditional rule to add 10 months to the value of dateTime2 and assign the result to dateTime1.
![]()
A sample Ruletest provides values of dateTime2 for three instances of Entity1. Input and Output panels are shown below. Notice the year portion of dateTime1 also changes accordingly.
![]()