Since v1.2.0
Available on all platforms
See also

Adds years to a timestamp or a tselements.

The ADDYEARS function consumes from the top of the stack a number (positive or negative) of years, a time parameter (timestamp or tselements) and optionally a timezone parameter. It adds the years 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.



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