It is possible to produce a date in the contract text based on a calculation. For example, you can automatically ‘calculate’ a contract’s termination date and insert it into the contract with the formula “[effective date] + 365 days” (presuming the effective date is a known date).

Date calculations are performed with the [datecalc] tag (examples are below). The [datecalc] tag must contain a formula with all the required variables for the calculation. In the questionnaire’s WYSIWYG view and generated document, the tag is replaced by the result.

Q&A answers may be used as variables. Therefore, a date calculation tag may contain global questions and (for values used in the same template component, like a contract clause) local questions. Similarly, any date calculation tag may be (re)used within another such tag in the same template component.

The following variables can be used to calculate a date:

Reference date This is the reference for the calculation – in the above example, that would be the effective date – the ‘date’ would be asked to the user (e.g. [date.Effective Date] )
Numbers A number (or calculated number) indicating how many days, weeks, months, etc. are to be added or subtracted
Operators + or –

It indicates that such number of days, weeks, etc. must added or deducted to the reference date (calculations can be ordered and sequenced as in calc-tags by using round brackets, and operators also include dividing, multiplying or taking root, exponentials etc., if necessary).

Units of time: Days

Weeks

Months

Years

Note that the units of time are always plural (so “+1 Months”) and, regardless of the template-language, always in English.

If that would be relevant, the calculation may of course also contain other operators (e.g. taking the exponent or square root, or dividing or multiplying parts of the calculation).

If the date calculation involves business days, other variables (also) come into play:

Units of time: BusinessDays

PreviousBusinessDay

NextBusinessDay

A country For taking into account public holidays, the relevant country must be known. The country can be derived from a Q&A (country) question. If no country is specified, the country defined for the Own party will apply. Check with Weagree if the public holidays and business days for a particular jurisdiction are available and maintained on your portal.

All of the above variables can be hardcoded in the [datecalc] tag or be derived from a Q&A question on one condition: a value provided by the user must be a numeral (e.g. “10” instead of “ten”).

The following grammar will result in a ‘date expression’:

  • < jurisdiction > < a date > + or – < number expression > Days/Weeks/Months/Years/BusinessDays
  • PreviousBusinessDay / NextBusinessDay < date expression >

Examples:

Automatically calculating the expiry date of the contract: being 52 weeks after the starting date, less one day:

[datecalc.Expiration date.([date.Effective Date of the contract] + 52 Weeks – 1 Days)]

Automatically calculating the last day on which a termination notice may be sent:

[datecalc.Last date for termination notice.(PreviousBusinessDay ([gq.Expiration date] – 1 Months) )]

Automatically calculating the day on which an exclusivity period ends:

[datecalc.End exclusivity period.(NextBusinessDay [gq.Effective Date] + [edit.Post expiry notice period] Days)]

Automatically calculating the first business day on which an instalment payment must be satisfied:

[datecalc.Instalment 2 payment date.(NextBusinessDay [gq.Instalment 2 date] )]

Automatically calculating the working day (taking into account public holidays) on which a payment has to be satisfied in respect of a German supplier:

[datecalc.Payment German purchase price.([country.Business Days in countryname], [edit.Payment Date 1] + 10 BusinessDays)]

Automatically calculating the ultimate delivery date, but allowing for a grace period defined in the questionnaire:

[datecalc.End of grace period.(NextBusinessDay ([date.Ultimate delivery date] + [edit.Grace period in weeks] Weeks) )]

In many cases, you will convert the (local) date question (e.g. asking for the Effective Date) into a global question, since you will probably need to both explicitly mention the date and use it in the calculation.