Return type | Name and parameters |
---|---|
int
|
getEra()
Equivalent to calling the Year#get(java.time.temporal.TemporalField) method with a ChronoField#ERA argument. |
int
|
getYearOfEra()
Equivalent to calling the Year#get(java.time.temporal.TemporalField) method with a ChronoField#YEAR_OF_ERA argument. |
YearMonth
|
leftShift(Month month)
Returns a YearMonth of this year and the provided Month. |
LocalDate
|
leftShift(MonthDay monthDay)
Returns a LocalDate of this year on the given MonthDay. |
Year
|
minus(long years)
Returns a Year that is years years before this year.
|
Year
|
next()
Returns a Year after this year. |
Year
|
parse(CharSequence text, String pattern)
Parse text into a Year using the provided pattern. |
Year
|
plus(long years)
Returns a Year that is years years after this year.
|
Year
|
previous()
Returns a Year before this year. |
Period
|
rightShift(Year year)
Returns a Period between the first day of this year (inclusive) and the first day of the provided Year (exclusive). |
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
, 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
Equivalent to calling the Year#get(java.time.temporal.TemporalField) method with a ChronoField#ERA argument.
Returns the era of the year, which is currently either 0 (BC) or 1 (AD).
Equivalent to calling the Year#get(java.time.temporal.TemporalField) method with a ChronoField#YEAR_OF_ERA argument.
Since Year=0 represents 1 BC, the yearOfEra value of Year=0 is 1, Year=-1 is 2, and so on.
Returns a YearMonth of this year and the provided Month.
month
- a MonthReturns a LocalDate of this year on the given MonthDay.
monthDay
- a MonthDayReturns a Year that is years
years before this year.
years
- the number of years to subtractParse text into a Year using the provided pattern.
text
- String to be parsed to create the date instancepattern
- pattern used to parse the textReturns a Year that is years
years after this year.
years
- the number of years to add