Uses of Class
java.time.Year
Packages that use Year
-
Uses of Year in java.time
Modifier and TypeMethodDescriptionstatic YearYear.from(TemporalAccessor temporal) Obtains an instance ofYearfrom a temporal object.Year.minus(long amountToSubtract, TemporalUnit unit) Returns a copy of this year with the specified amount subtracted.Year.minus(TemporalAmount amountToSubtract) Returns a copy of this year with the specified amount subtracted.Year.minusYears(long yearsToSubtract) Returns a copy of thisYearwith the specified number of years subtracted.static YearYear.now()Obtains the current year from the system clock in the default time-zone.static YearObtains the current year from the specified clock.static YearObtains the current year from the system clock in the specified time-zone.static YearYear.of(int isoYear) Obtains an instance ofYear.static YearYear.parse(CharSequence text) Obtains an instance ofYearfrom a text string such as2007.static YearYear.parse(CharSequence text, DateTimeFormatter formatter) Obtains an instance ofYearfrom a text string using a specific formatter.Year.plus(long amountToAdd, TemporalUnit unit) Returns a copy of this year with the specified amount added.Year.plus(TemporalAmount amountToAdd) Returns a copy of this year with the specified amount added.Year.plusYears(long yearsToAdd) Returns a copy of thisYearwith the specified number of years added.Year.with(TemporalAdjuster adjuster) Returns an adjusted copy of this year.Year.with(TemporalField field, long newValue) Returns a copy of this year with the specified field set to a new value.