캘린더 예외 검색

달력 검색 예외 Calendar 클래스는 getExceptions () 메소드를 사용하여 예외를 컬렉션으로 반환합니다. Calendarexception에 노출 된 getfromdate () 및 getTodate () 메소드는 달력 예외에 대한 날짜를 검색하는 데 사용됩니다. 이 두 방법 모두 날짜 데이터 유형을 지원합니다.

프로그래밍 샘플

다음 예제는 달력 예외를 검색합니다.

 1// The path to the documents directory.
 2String dataDir = Utils.getDataDir(RetrieveCalendarExceptions.class);
 3
 4Project project = new Project(dataDir + "file.mpp");
 5
 6for(Calendar cal:project.getCalendars())
 7{
 8    for(CalendarException calExc: cal.getExceptions())
 9          {
10            System.out.println("From: " + calExc.getFromDate().toString()) ;
11            System.out.println("To: " + calExc.getToDate().toString()) ;
12      }
13}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.