HotDocs Models: monthOf( date )

Placeholder Replace With
date A date value, such as a Date variable

This expression returns the month portion of a given date.

For example, in the following script, a new employee has temporary status until the end of his or her third month with the company. HotDocs uses the month of expression to specify which month that is:

dateOf( 1, monthOf( HireDate + 3 months ), yearOf( HireDate + 3 months ) ) - 1 days

In this example, HotDocs finds the first day of the fourth month of employment. HotDocs then subtracts one day to reveal the last day of the third month—either the 28th, 29th, 30th or 31st—depending on the month. It then inserts the new date into the document.