ICalendarDimInstance.Day

Syntax

Day(El: Integer): Integer;

Parameters

El - index of the element that corresponds to a calendar period in the dictionary (Year, Half-Year, and so on).

Description

The Day method returns index of an element indicating day in calendar dictionary. This day is the start date of calendar period, to which the El element corresponds.

Example

Sub Main;

Var

MB: IMetabase;

Obj: IMetabaseObjectDescriptor;

CalClass: CalendarDimInstanceFactory;

Dim: IDimInstance;

CalInst: ICalendarDimInstance;

i: Integer;

Begin

Mb:=MetabaseClass.Active;

Obj:=Mb.ItemById("CALENDAR_DIM");

Dim:=Obj.Open(Null) As IDimInstance;

CalClass:=New CalendarDimInstanceFactory.Create;

CalInst:=CalClass.CreateCalendarDimInstance(Dim);

i:=CalInst.Day(Dim.Elements.FindById("YEARS:2002"));

End Sub Main;

After executing the example the "i' variable contains index of the element corresponding to January 1, 2002. Dictionary identifier: CALENDAR_DIM.

See also:

ICalendarDimInstance