All Implemented Interfaces:
Serializable, Comparable<YearMonth>, Temporal, TemporalAccessor, TemporalAdjuster

  • Method Summary

    Adjusts the specified temporal object to have this year-month.

    atDay(int dayOfMonth)

    Combines this year-month with a day-of-month to create a LocalDate.

    Returns a LocalDate at the end of the month.

    int

    Compares this year-month to another year-month.

    boolean

    Checks if this year-month is equal to another year-month.

    Formats this year-month using the specified formatter.

    Obtains an instance of YearMonth from a temporal object.

    int

    Gets the value of the specified field from this year-month as an int.

    long

    Gets the value of the specified field from this year-month as a long.

    getMonth()

    Gets the month-of-year field using the Month enum.

    int

    Gets the month-of-year field from 1 to 12.

    int

    getYear()

    int

    hashCode()

    A hash code for this year-month.

    boolean

    Checks if this year-month is after the specified year-month.

    boolean

    Checks if this year-month is before the specified year-month.

    boolean

    Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

    boolean

    Checks if the specified field is supported.

    boolean

    Checks if the specified unit is supported.

    boolean

    isValidDay(int dayOfMonth)

    Checks if the day-of-month is valid for this year-month.

    int

    Returns the length of the month, taking account of the year.

    int

    Returns the length of the year.

    Returns a copy of this year-month with the specified amount subtracted.

    Returns a copy of this year-month with the specified amount subtracted.

    minusMonths(long monthsToSubtract)

    Returns a copy of this YearMonth with the specified number of months subtracted.

    minusYears(long yearsToSubtract)

    Returns a copy of this YearMonth with the specified number of years subtracted.

    now()

    Obtains the current year-month from the system clock in the default time-zone.

    Obtains the current year-month from the specified clock.

    Obtains the current year-month from the system clock in the specified time-zone.

    of(int year, int month)

    Obtains an instance of YearMonth from a year and month.

    of(int year, Month month)

    Obtains an instance of YearMonth from a year and month.

    Obtains an instance of YearMonth from a text string such as 2007-12.

    Obtains an instance of YearMonth from a text string using a specific formatter.

    Returns a copy of this year-month with the specified amount added.

    Returns a copy of this year-month with the specified amount added.

    plusMonths(long monthsToAdd)

    Returns a copy of this YearMonth with the specified number of months added.

    plusYears(long yearsToAdd)

    Returns a copy of this YearMonth with the specified number of years added.

    <R> R

    Queries this year-month using the specified query.

    Gets the range of valid values for the specified field.

    toString()

    Outputs this year-month as a String, such as 2007-12.

    long

    Calculates the amount of time until another year-month in terms of the specified unit.

    Returns an adjusted copy of this year-month.

    Returns a copy of this year-month with the specified field set to a new value.

    withMonth(int month)

    Returns a copy of this YearMonth with the month-of-year altered.

    withYear(int year)

    Returns a copy of this YearMonth with the year altered.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Method Details

    • now

    • now

    • now

    • of

    • of

    • from

    • parse

    • parse

    • isSupported

    • isSupported

    • range

    • get

    • getLong

    • getYear

    • getMonthValue

    • getMonth

    • isLeapYear

    • isValidDay

    • lengthOfMonth

    • lengthOfYear

    • with

    • with

    • withYear

    • withMonth

    • plus

    • plus

    • plusYears

    • plusMonths

    • minus

    • minus

    • minusYears

    • minusMonths

    • query

    • adjustInto

    • until

    • format

    • atDay

    • atEndOfMonth

    • compareTo

    • isAfter

    • isBefore

    • equals

    • hashCode

    • toString