IMsTimeMatrix.CalendarSettings

Syntax

CalendarSettings: IMsCalendarSettings;

Description

The CalendarSettings property returns the calendar level parameters for custom calculation method.

Comments

The property is read-only. By using this property the first day of the week, the number of days off and other parameters can be modified.

Example

This example describes custom method.

To execute the example, add links to the Ms, Dimensions, Transform system assemblies.

Public Function Remove(param: IMsTimeMatrix; Index: Integer): Variant;
Var
    TsCalc: TsCalculation;
    Context: ITsCalculationContext;
    Serie: IMsTimeMatrix;
    CalendSett: ITsCalendarSettings;
    i, j: Integer;
    s: String;
Begin
    TsCalc := New TsCalculation.Create;
    Context := TsCalc.Current;
    Serie := Context.CreateTimeSeries;
    CalendSett := param.CalendarSettings;   
    Index := param.CurrentIndex;
    If CalendSett.RestDays = DayOfWeekSet.SaturdaySunday Then
        param.DeleteSerie(Index);
        param.MoveSerie(0,5);
        For i := 0 To param.Count - 1 Do
            s := "";
            For j := param.StartIndex To param.EndIndex Do
                s := s + (param.Item(i).Item(j) As double).ToString + " ";
            End For;
            Debug.WriteLine("Lag index: " + param.LagIndex(0,1).ToString);
            Debug.WriteLine("Series: " + i.ToString + " - " + s);
        End For;
    End If
    Return Null;
End Function Remove;

The method removes and moves matrix series if series days off are Saturday and Sunday. After that the console window displays lag index and resulting matrix series.

See also:

IMsTimeMatrix