ICalendarDimInstance.FinishPeriod

Syntax

FinishPeriod(El: Integer): Integer;

Parameters

El — element index.

Description

The FinishPeriod method returns index of the element corresponding to the end of the period containing element passed by the El parameter.

Example

Sub UserProc;
Var
    MB: IMetabase;
    CalClass: CalendarDimInstanceFactory;
    Dim: IDimInstance;
    CalInst: ICalendarDimInstance;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Dim := MB.ItemById("CALENDAR_DIM").Open(NullAs IDimInstance;
    CalClass := New CalendarDimInstanceFactory.Create;
    CalInst := CalClass.CreateCalendarDimInstance(Dim);
    i := CalInst.FinishPeriod(100);
End Sub UserProc;

After executing the example the "i" variable contains index of the element corresponding to the end of period containing the 100th element. Dictionary identifier: CALENDAR_DIM.

See also:

ICalendarDimInstance