カレンダーの例外を取得します
カレンダーの例外を取得 カレンダークラスは、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}