Package: java.time

## Class Period

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `Period` | `between(Year startInclusive, Year endExclusive)` Obtains a Period consisting of the number of years between two Year instances.
    `Period` | `between(YearMonth startInclusive, YearMonth endExclusive)` Obtains a Period consisting of the number of years and months between two YearMonth instances.
    `Period` | `minus(long days)` Returns a Period that is `days` days shorter than this period.
    `Period` | `multiply(int scalar)` Supports the multiply operator; equivalent to calling the Period#multipliedBy(int) method.
    `Period` | `negative()` Supports the unary minus operator; equivalent to calling the Period#negated() method.
    `Period` | `next()` Returns a Period that is one day longer than this period.
    `Period` | `plus(long days)` Returns a Period that is `days` days longer than this period.
    `Period` | `positive()` Supports the unary plus operator; returns a Period with all unit values positive.
    `Period` | `previous()` Returns a Period that is one day shorter than this period.

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

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `dump`, `each`, `eachMatch`, `eachMatch`, `eachWithIndex`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `isNotCase`, `iterator`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `split`, `sprintf`, `sprintf`, `stream`, `tap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withCloseable`, `withStream`, `withTraits`

  - #### Methods inherited from interface java.time.chrono.ChronoPeriod

    `isNonnegative`, `isNonpositive`, `isPositive`

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

    `getAt`

- - ### Methods Detail

    - #### public Period between(Year startInclusive, Year endExclusive)

      Obtains a Period consisting of the number of years between two Year instances. The months and days of the Period will be zero. The result of this method can be a negative period if the end is before the start.

      Parameters:
        `startInclusive` - the start Year, inclusive, not null
        `endExclusive` - the end Year, exclusive, not null
      Returns:
        a Period between the years
      See Also:
        Period#between(LocalDate, LocalDate)

    - #### public Period between(YearMonth startInclusive, YearMonth endExclusive)

      Obtains a Period consisting of the number of years and months between two YearMonth instances. The days of the Period will be zero. The result of this method can be a negative period if the end is before the start.

      Parameters:
        `startInclusive` - the start YearMonth, inclusive, not null
        `endExclusive` - the end YearMonth, exclusive, not null
      Returns:
        a Period between the year/months
      See Also:
        Period#between(LocalDate, LocalDate)

    - #### public Period minus(long days)

      Returns a Period that is `days` days shorter than this period. No normalization is performed.

      Parameters:
        `days` - the number of days to decrease this Period by
      Returns:
        a Period
      Since:
        2.5.0

    - #### public Period multiply(int scalar)

      Supports the multiply operator; equivalent to calling the Period#multipliedBy(int) method.

      Parameters:
        `scalar` - a scalar to multiply each unit by
      Returns:
        a Period
      Since:
        2.5.0

    - #### public Period negative()

      Supports the unary minus operator; equivalent to calling the Period#negated() method.

      Returns:
        a negated Period
      Since:
        2.5.0

    - #### public Period next()

      Returns a Period that is one day longer than this period. No normalization is performed.

      Returns:
        a Period one day longer in length
      Since:
        2.5.0

    - #### public Period plus(long days)

      Returns a Period that is `days` days longer than this period. No normalization is performed.

      Parameters:
        `days` - the number of days to increase this Period by
      Returns:
        a Period
      Since:
        2.5.0

    - #### public Period positive()

      Supports the unary plus operator; returns a Period with all unit values positive. For example, a period of "2 years, -3 months, and -4 days" would result in a period of "2 years, 3 months, and 4 days." No normalization is performed.

      Returns:
        a positive Period
      Since:
        2.5.0

    - #### public Period previous()

      Returns a Period that is one day shorter than this period. No normalization is performed.

      Returns:
        a Period one day shorter in length
      Since:
        2.5.0