intvName Function

Returns the name of the interval that is col intervals ahead of the input_date.


str intvName(date input_date, int col, int func)

Parameter

Description

input_date

A date in the first interval.

col

The number of intervals ahead of input_date.

func

An intvScale enumeration.

The name of the interval.

For example, if func specifies days (IntvScale::WeekDay), intvName will return the name of the week day. If func specifies weeks (IntvScale::Week) intvName will return a string that contains the number of the week. For description of the func parameter see intvMax.

static void intvNameExample(Args _args)
{
    date refDate = str2Date("8/31/2007", 213);
    str name;
    ;
    name = intvName(refDate, 2,  intvScale::Month);
    //Name now holds the month that is 2 months after August (Oct).
    print name;
    pause;
}

Community Additions

ADD
Show: