Uses of Class
java.time.MonthDay

  • Packages that use MonthDay 
    PackageDescription
    java.time
    The main API for dates, times, instants, and durations.
    • Uses of MonthDay in java.time

      Methods in java.time that return MonthDay 
      Modifier and TypeMethodDescription
      static MonthDayMonthDay.from​(TemporalAccessor temporal)
      Obtains an instance of MonthDay from a temporal object.
      static MonthDayMonthDay.now()
      Obtains the current month-day from the system clock in the default time-zone.
      static MonthDayMonthDay.now​(Clock clock)
      Obtains the current month-day from the specified clock.
      static MonthDayMonthDay.now​(ZoneId zone)
      Obtains the current month-day from the system clock in the specified time-zone.
      static MonthDayMonthDay.of​(int month, int dayOfMonth)
      Obtains an instance of MonthDay.
      static MonthDayMonthDay.of​(Month month, int dayOfMonth)
      Obtains an instance of MonthDay.
      static MonthDayMonthDay.parse​(CharSequence text)
      Obtains an instance of MonthDay from a text string such as --12-03.
      static MonthDayMonthDay.parse​(CharSequence text, DateTimeFormatter formatter)
      Obtains an instance of MonthDay from a text string using a specific formatter.
      MonthDayMonthDay.with​(Month month)
      Returns a copy of this MonthDay with the month-of-year altered.
      MonthDayMonthDay.withDayOfMonth​(int dayOfMonth)
      Returns a copy of this MonthDay with the day-of-month altered.
      MonthDayMonthDay.withMonth​(int month)
      Returns a copy of this MonthDay with the month-of-year altered.
      Methods in java.time with parameters of type MonthDay 
      Modifier and TypeMethodDescription
      LocalDateYear.atMonthDay​(MonthDay monthDay)
      Combines this year with a month-day to create a LocalDate.
      intMonthDay.compareTo​(MonthDay other)
      Compares this month-day to another month-day.
      booleanMonthDay.isAfter​(MonthDay other)
      Checks if this month-day is after the specified month-day.
      booleanMonthDay.isBefore​(MonthDay other)
      Checks if this month-day is before the specified month-day.
      booleanYear.isValidMonthDay​(MonthDay monthDay)
      Checks if the month-day is valid for this year.

微信小程序

微信扫一扫体验

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部