RE: Backward scheduling and forward scheduling considering non-working days
The base calendar is assigned and I have indicated what are working days and what are not working day.
But I have trouble recognizing and using the help function in the CU 7600. My code below works correctly but is very inefficient, so I would like to use this helper function. Could I get an example of forward and backward scheduling?
procedure fnCalculateDateBackward(parDueDate: Date; parDateformula: DateFormula) StartDateL: Date
var
NumerOfDaysL: Integer;
I: Integer;
begin
StartDateL := parDueDate;
NumerOfDaysL := (CalcDate(parDateformula, 20010101D) - 20010101D);
for I := 1 to NumerOfDaysL do begin
StartDateL := CalcDate('<-1D>', StartDateL);
if CalenderMgmtG.IsNonworkingDay(StartDateL, CustomizedCalenderChange) then begin
I := I - 1;
end;
end;
end;