TimeSeries.CreateEx

Syntax

CreateEx(CalendarLevel: DimCalendarLevel; CalendarSettings: ITsCalendarSettings);

Parameters

CalendarLevel. Series calendar frequency.

CalendarSettings. Calendar level parameters.

Description

The CreateEx constructor creates a series with the specified calendar level parameters.

Comments

Use the TimeSeries.Create default constructor to create a series without additional parameters.

Example

A custom series calculation method is given in the example. To execute the example, add links to the Dimensions, Ms, Transform system assemblies.

Function TimeS(Input: ITimeSeries): ITimeSeries;
Var
    pContext: ITsCalculationContext;
    i: Integer;
    CalendSett: ITsCalendarSettings;
    pSeries: ITimeSeries;
Begin
    pContext := TsCalculation.Current;
    CalendSett := New MsCalendarSettings.Create;
    CalendSett.RestDays := DayOfWeekSet.SaturdaySunday;
    CalendSett.FirstDay := DayOfWeekSet.Monday;
    pSeries := New TimeSeries.CreateEx(DimCalendarLevel.Day, CalendSett);
    If pSeries.CheckCompatible(Input, TrueThen
        For i := pSeries.StartIndex To pSeries.EndIndex Do
            pSeries.Item(i) := 1 + Input.Item(i);
        End For;
    End If;
    Return pSeries;
End Function TimeS;

The method increases input series values if it is compatible with the user calculation method context.

See also:

TimeSeries