クラス
java.time.MonthDayの使用

MonthDayを使用しているパッケージ 
パッケージ 説明
java.time
日付、時間、インスタント、デュレーションのメインAPI。
  • java.timeでのMonthDayの使用

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