The tasks.businessDuration() method returns the business-only duration of the specified task. The duration is calculated from the current position of the task in the Gantt chart component, taking the defined business cells into account (see also onBeforeCellRender).
DayPilot.Gantt.tasks.businesssDuration(task);
task
(DayPilot.Task, source data object, or id)
DayPilot.Duration object
or null
if the specified tasks doesn’t belong to the Gantt chart component