AdjustDate

STD.Date.AdjustDate( date , [year_delta],[month_delta] ,[day_delta] )

dateA date value in the Date_t format.
year_deltaThe minimum acceptable year. Optional; defaults to zero.
month_deltaThe minimum acceptable year. Optional; defaults to zero.
day_deltaThe maximum acceptable year. Optional; defaults to zero.
Return:AdjustDate returns date_t representing the adjusted date.

The AdjustDate function adjusts a date by incrementing or decrementing year, month, and/or day values. The date must be in the Gregorian calendar after the year 1600.

If the new calculated date is invalid then it is normalized according to mktime() rules. For example, 20140130 plus 1 month would be 20140302.

Example:

IMPORT std;
inDate :=19631123;
Std.Date.AdjustDate(inDate,5,1,3);  //returns 19681226

See Also: AdjustCalendar