본문으로 건너뛰기

getSubtaskDuration

Description

프로젝트나 다른 작업에 중첩된 작업들의 총 지속 시간을 계산합니다.

getSubtaskDuration: (task_id?: string | number) => number

Parameters

  • task_id - (optional) string | number - 작업의 ID이며, 지정하지 않을 경우 root_id가 사용됩니다

Returns

  • duration - (number) - 중첩된 작업들의 총 지속 시간

Example

const formatter = gantt.ext.formatters.durationFormatter();
//전체 프로젝트의 지속 시간
let duration = gantt.getSubtaskDuration();

console.log(formatter.format(duration));

//하위 프로젝트의 지속 시간
duration = gantt.getSubtaskDates(1);

console.log(formatter.format(duration));

Details

프로젝트나 다른 작업에 중첩된 작업들의 총 지속 시간을 계산합니다.

project type의 작업은 총 지속 시간에 포함되지 않습니다.

반환 값은 구성에서 정의된 duration units 단위로 계산됩니다.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.