クラス
java.time.MonthDayの使用
-
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)
月-日がこの年に対して有効であるかどうかを確認します。