CalendarSettings: IMsCalendarSettings;
The property is read-only.
The CalendarSettings property returns the calendar level parameters for custom calculation method.
By using this property the first day of the week, the number of days off and other parameters can be modified.
This example displays custom series calculation method. To execute the example, add links to the Dimensions, Ms, Transform system assemblies.
Function RestDays(Input: ITimeSeries): ITimeSeries;
Var
TsCalc: TsCalculation;
pContext: ITsCalculationContext;
i: Integer;
pSeries: ITimeSeries;
CalendSett: ITsCalendarSettings;
Begin
TsCalc := New TsCalculation.Create;
pContext := TsCalc.Current;;
pSeries := pContext.CreateTimeSeries;
CalendSett := Input.CalendarSettings;
If CalendSett.RestDays = DayOfWeekSet.SaturdaySunday Then
For i := Input.StartIndex To Input.EndIndex Do
pSeries.Item(i) := 1 + Input.Item(i);
End For;
End If;
Return pSeries;
End Function RestDays;
The method increases input series values if the series days off are Saturday and Sunday.
See also: