ADDMONTH C-3





Copyright (C) 1994-95 Conetic Software Systems, Inc. All names, products, and services mentioned are the trademarks of their respective organizations.



NAME


addmonth - add months to DATE value

SYNOPSIS


#include 

DATE addmonth (d, m)
DATE d;
int m;

DESCRIPTION


This function adds the number of months specified by m to the
date d and returns the resulting date. A negative m value
subtracts that many months from the date. If the number of days
in the resulting date is larger than the last day of that month,
then the day is reset to the last day of that month.

     01/31/81 + 1 month = 02/28/81

If m is a multiple of 12, that many years is added (or
subtracted) from the date.

If closedate is the last day of any month, the following
calculates the last day of the following month:

     nextclose = addmonth (closedate+1, 1) - 1;

SEE ALSO


atodate(C-3), firstday(C-3)