カレンダーの例外を使用して作業します

例外のための処理の発生 Calendarexceptionクラスによって公開されたsetoccurrencesとsetenteredbyocurencesメソッドは、例外のために発生を処理するために使用されます。 Occurrencesは整数データ型をサポートし、EnteredByoccurrencesはブールのデータ型をサポートします。

プログラミングの例

次のコード行は、例外を5年間有効にします。

1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(HandleOccurrences.class);
4
5CalendarException except = new CalendarException();
6except.setEnteredByOccurrences(true);
7except.setOccurrences(5);
8except.setType(CalendarExceptionType.YearlyByDay);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.