クラス
java.time.MonthDayの使用
- 
java.timeでのMonthDayの使用
MonthDayを返すjava.timeのメソッド 修飾子と型 メソッド 説明 static MonthDayMonthDay. from(TemporalAccessor temporal)時間的オブジェクトからMonthDayのインスタンスを取得します。static MonthDayMonthDay. now()デフォルトのタイムゾーンのシステム・クロックから現在の月-日を取得します。static MonthDayMonthDay. now(Clock clock)指定されたクロックから現在の月-日を取得します。static MonthDayMonthDay. now(ZoneId zone)指定されたタイムゾーンのシステム・クロックから現在の月-日を取得します。static MonthDayMonthDay. of(int month, int dayOfMonth)MonthDayのインスタンスを取得します。static MonthDayMonthDay. of(Month month, int dayOfMonth)MonthDayのインスタンスを取得します。static MonthDayMonthDay. parse(CharSequence text)--12-03などのテキスト文字列からMonthDayのインスタンスを取得します。static MonthDayMonthDay. parse(CharSequence text, DateTimeFormatter formatter)特定のフォーマッタを使用して、テキスト文字列からMonthDayのインスタンスを取得します。MonthDayMonthDay. with(Month month)月を変更して、このMonthDayのコピーを返します。MonthDayMonthDay. withDayOfMonth(int dayOfMonth)「月の日」を変更して、このMonthDayのコピーを返します。MonthDayMonthDay. withMonth(int month)月を変更して、このMonthDayのコピーを返します。型MonthDayのパラメータを持つjava.timeのメソッド 修飾子と型 メソッド 説明 LocalDateYear. atMonthDay(MonthDay monthDay)この年を月-日と組み合せてLocalDateを作成します。intMonthDay. compareTo(MonthDay other)この月-日を別の月-日と比較します。booleanMonthDay. isAfter(MonthDay other)この月/日が、指定された月/日より後にあるかどうかをチェックします。booleanMonthDay. isBefore(MonthDay other)この月/日が、指定された月/日より前にあるかどうかをチェックします。booleanYear. isValidMonthDay(MonthDay monthDay)月-日がこの年に対して有効であるかどうかを確認します。