Package: java.time

## Class YearMonth

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `LocalDate` | `leftShift(int dayOfMonth)` Returns a LocalDate of this year/month and the given day of the month.
    `YearMonth` | `minus(long months)` Returns a YearMonth that is `months` months before this year/month.
    `YearMonth` | `next()` Returns a YearMonth that is the month after this year/month.
    `YearMonth` | `parse(CharSequence text, String pattern)` Parse text into a YearMonth using the provided pattern.
    `YearMonth` | `plus(long months)` Returns a YearMonth that is `months` months after this year/month.
    `YearMonth` | `previous()` Returns a YearMonth that is the month before this year/month.
    `Period` | `rightShift(YearMonth other)` Returns a Period of time between the first day of this year/month (inclusive) and the given YearMonth (exclusive).

  - #### Methods inherited from class java.lang.Object

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `average`, `collect`, `collect`, `collect`, `contains`, `count`, `dump`, `each`, `eachWithIndex`, `equals`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `flatten`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `groupBy`, `groupBy`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `iterator`, `join`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `size`, `split`, `sprintf`, `sprintf`, `stream`, `sum`, `sum`, `tap`, `toArrayString`, `toSpreadMap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withTraits`

  - #### Methods inherited from interface java.lang.Comparable

    `numberAwareCompareTo`

  - #### Methods inherited from interface java.time.temporal.Temporal

    `downto`, `downto`, `rightShift`, `upto`, `upto`

  - #### Methods inherited from interface java.time.temporal.TemporalAccessor

    `getAt`

- - ### Methods Detail

    - #### public LocalDate leftShift(int dayOfMonth)

      Returns a LocalDate of this year/month and the given day of the month.

      Parameters:
        `dayOfMonth` - a day of the month
      Returns:
        a LocalDate
      Since:
        2.5.0

    - #### public YearMonth minus(long months)

      Returns a YearMonth that is `months` months before this year/month.

      Parameters:
        `months` - the number of months to subtract
      Returns:
        a Year
      Since:
        2.5.0

    - #### public YearMonth next()

      Returns a YearMonth that is the month after this year/month.

      Returns:
        the next YearMonth
      Since:
        2.5.0

    - #### public YearMonth parse(CharSequence text, String pattern)

      Parse text into a YearMonth using the provided pattern.

      Parameters:
        `text` - String to be parsed to create the date instance
        `pattern` - pattern used to parse the text
      Returns:
        a YearMonth representing the parsed text
      Since:
        2.5.0
      See Also:
        DateTimeFormatter
        YearMonth#parse(java.lang.CharSequence, java.time.format.DateTimeFormatter)

    - #### public YearMonth plus(long months)

      Returns a YearMonth that is `months` months after this year/month.

      Parameters:
        `months` - the number of months to add
      Returns:
        a Year
      Since:
        2.5.0

    - #### public YearMonth previous()

      Returns a YearMonth that is the month before this year/month.

      Returns:
        the previous YearMonth
      Since:
        2.5.0

    - #### public Period rightShift(YearMonth other)

      Returns a Period of time between the first day of this year/month (inclusive) and the given YearMonth (exclusive).

      Parameters:
        `other` - another YearMonth
      Returns:
        a Period
      Since:
        2.5.0