getClosestWorkTime
Description
가장 가까운 작업 시간을 반환합니다
getClosestWorkTime: Calendar['getClosestWorkTime']
Parameters
config- (required) object - 설정 객체 또는 날짜
Returns
date- (Date) - 가장 가까운 작업 시간을 나타내는 Date 객체
Example
// 전역 설정에 따라 주어진 날짜가 작업일인지 확인합니다
gantt.getClosestWorkTime({date:new Date(2019,04,26)});
// 또는
gantt.getClosestWorkTime(new Date(2019,04,26));
// 특정 작업에 대해 주어진 날짜가 작업일인지 확인합니다
gantt.getClosestWorkTime({ date: new Date(2019,04,26), task:task });
Details
노트
work_time 옵션이 비활성화된 경우, 이 메서드는 날짜를 변경 없이 반환합니다.
- task가 제공되지 않으면 이 메서드는 글로벌 작업 시간 캘린더를 사용합니다.
- 또한, 이 메서드는 캘린더 객체에서 직접 호출할 수도 있습니다.
설정 객체 속성
설정 객체는 다음 속성을 포함할 수 있습니다:
속성 | 설명 |
|---|---|
| date | 가장 가까운 작업 시간을 요청하는 날짜 |
| |
| dir | ('future' 또는 'past') 가장 가까운 시간을 찾을 방향을 지정 |
| |
| unit | 가장 가까운 작업 시간을 찾을 때 사용하는 시간 단위 |
| |
| task | 선택 사항, 기간 계산에 사용할 작업 객체 |
| |
Related API
Related Guides
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.