You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Returns a timestamp resultant of adding n months to timestamp t.

Use this function instead of simply adding n * {MONTH}, since {MONTH}is a macro equivalent to 30 * {DAY}. Negative values for n are used in order to subtract instead of adding.

Syntax
addMonths(number t, number n, timeZone time_zone) #Output: number 

In this function we are not taking into consideration the fact that some months have more or less than 30 days.