Loading

ADDMONTHS


date
Since v1.2.0
Available on all platforms
See also

Adds months to a timestamp or a tselements.

The ADDMONTHS function consumes from the top of the stack a number (positive or negative) of months, a time parameter (timestamp or tselements) and optionally a timezone parameter. It adds the months and when an optional timezone is specified the computation is performed using it instead of UTC. Timezone names are the ones defined in Joda Time.

This function will take into account leap years and, when working with timestamps, possible daylight saving time change.

Signature

Examples

// 2018-03-24 22:00:39Z 1521928839 STU * 'NOW' STORE $NOW 5 ADDMONTHS $NOW -2 ADDMONTHS $NOW 'Europe/Paris' 5 ADDMONTHS $NOW 'Europe/Paris' TSELEMENTS 5 ADDMONTHS $NOW TSELEMENTS 5 ADDMONTHS