# Uses of Class
java.time.Year

Packages that use Year
Package
Description
java.time
The main API for dates, times, instants, and durations.

- ## Uses of Year in java.time

  Classes in java.time that implement interfaces with type arguments of type Year
  Modifier and Type
  Class
  Description
  `final class`
  `Year`
  A year in the ISO-8601 calendar system, such as `2007`.
  Methods in java.time that return Year
  Modifier and Type
  Method
  Description
  `static Year`
  Year.`from(TemporalAccessor temporal)`
  Obtains an instance of `Year` from a temporal object.
  `Year`
  Year.`minus(long amountToSubtract, TemporalUnit unit)`
  Returns a copy of this year with the specified amount subtracted.
  `Year`
  Year.`minus(TemporalAmount amountToSubtract)`
  Returns a copy of this year with the specified amount subtracted.
  `Year`
  Year.`minusYears(long yearsToSubtract)`
  Returns a copy of this `Year` with the specified number of years subtracted.
  `static Year`
  Year.`now()`
  Obtains the current year from the system clock in the default time-zone.
  `static Year`
  Year.`now(Clock clock)`
  Obtains the current year from the specified clock.
  `static Year`
  Year.`now(ZoneId zone)`
  Obtains the current year from the system clock in the specified time-zone.
  `static Year`
  Year.`of(int isoYear)`
  Obtains an instance of `Year`.
  `static Year`
  Year.`parse(CharSequence text)`
  Obtains an instance of `Year` from a text string such as `2007`.
  `static Year`
  Year.`parse(CharSequence text, DateTimeFormatter formatter)`
  Obtains an instance of `Year` from a text string using a specific formatter.
  `Year`
  Year.`plus(long amountToAdd, TemporalUnit unit)`
  Returns a copy of this year with the specified amount added.
  `Year`
  Year.`plus(TemporalAmount amountToAdd)`
  Returns a copy of this year with the specified amount added.
  `Year`
  Year.`plusYears(long yearsToAdd)`
  Returns a copy of this `Year` with the specified number of years added.
  `Year`
  Year.`with(TemporalAdjuster adjuster)`
  Returns an adjusted copy of this year.
  `Year`
  Year.`with(TemporalField field, long newValue)`
  Returns a copy of this year with the specified field set to a new value.
  Methods in java.time with parameters of type Year
  Modifier and Type
  Method
  Description
  `int`
  Year.`compareTo(Year other)`
  Compares this year to another year.
  `boolean`
  Year.`isAfter(Year other)`
  Checks if this year is after the specified year.
  `boolean`
  Year.`isBefore(Year other)`
  Checks if this year is before the specified year.