ServiceFunctionsCalculateDeadline Method

Scanjour Workflow4 Reference Manual
Calculate a deadline based on the currect date, a due date and a time span as follows: Due date in past deadline: create date. Due date in greater than 72h from current date. timespan gt 0: current date + time span. timespan lt 0: due date + timespan. Due date is less than 72h from current date. timespan gt 0: current date + (due date - current date)/3. timespan lt 0: due date - (due date - current date)/3*2. Due date missing: timespan gt 0: current date + time span. timespan lt 0: no deadline.

Namespace:  Scanjour.Workflow4.ActivityLibrary.ServiceProcess
Assembly:  Scanjour.Workflow4.ActivityLibrary_19.0.1.0 (in Scanjour.Workflow4.ActivityLibrary_19.0.1.0.dll) Version: 19.0.1.0 (19.0.1.0)
Syntax

public static DateTime CalculateDeadline(
	DateTime currentDate,
	DateTime dueDate,
	TimeSpan span,
	bool atNoon = false
)

Parameters

currentDate
Type: SystemDateTime
The current date.
dueDate
Type: SystemDateTime
The due date.
span
Type: SystemTimeSpan
The time span defined.
atNoon (Optional)
Type: SystemBoolean
True if deadline should be at noon, default false

Return Value

Type: DateTime
The new deadline.
See Also

Reference