nextMth Function

Retrieves the date in the following month that corresponds most closely to a specified date.

For example, nextMth(29\02\1996) returns 29\03\1996, but nextMth(31\01\1996) returns 29\02\1996 (leap year).


date nextMth(date date)

Parameter

Description

date

The date to match in the following month.

The closest match to date that is found in the next month.

static void nextMthExample(Args _arg)
{
    date d;
    ;
    d = nextMth(today()); 
    print "Closest date next month is " 
        + date2Str(d, 2, 2, -1, 2, -1, 4);    
    pause;
}

Community Additions

ADD
Show: