CreateEx(CalendarLevel: DimCalendarLevel; CalendarSettings: ITsCalendarSettings);
CalendarLevel. Series calendar frequency.
CalendarSettings. Calendar level parameters.
The CreateEx constructor creates a series with the specified calendar level parameters.
Use the TimeSeries.Create default constructor to create a series without additional parameters.
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, True) Then
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: