intvMax Function

Retrieves the number of intervals for the specified period when dividing the period into parts, as specified by the func parameter.


int intvMax(date input_date, date ref_date, int func)

Parameter

Description

input_date

The end of the period, which must be later than the ref_date parameter.

ref_date

The start of the period.

func

A IntvScale system enumeration value that indicates the division unit.

Possible values for the func parameter are:

  • None

  • YearMonthDay

  • YearMonth

  • Year

  • MonthDay

  • Month

  • Day

  • YearQuarter

  • Quarter

  • YearWeek

  • Week

  • WeekDay

static void intvMaxExample()
{
    date refDate = str2Date("4/9/2007", 213);
    date inputDate = str2Date("10/5/2007", 213);
    int numberOfIntervals;
    ;
    numberOfIntervals = intvMax(inputDate, refDate, intvScale::YearMonth);
    print numberOfIntervals;
    pause;
}

Community Additions

ADD
Show: