Uses of Class
org.joda.time.Years
Packages that use Years
Package
Description
Provides support for dates, times, time zones, durations, intervals, and
partials.
-
Uses of Years in org.joda.time
Fields in org.joda.time declared as YearsModifier and TypeFieldDescriptionstatic final Years
Years.MAX_VALUE
Constant representing the maximum number of years that can be stored in this object.static final Years
Years.MIN_VALUE
Constant representing the minimum number of years that can be stored in this object.static final Years
Years.ONE
Constant representing one year.static final Years
Years.THREE
Constant representing three years.static final Years
Years.TWO
Constant representing two years.static final Years
Years.ZERO
Constant representing zero years.Methods in org.joda.time that return YearsModifier and TypeMethodDescriptionYears.dividedBy
(int divisor) Returns a new instance with the years divided by the specified divisor.Years.minus
(int years) Returns a new instance with the specified number of years taken away.Returns a new instance with the specified number of years taken away.Years.multipliedBy
(int scalar) Returns a new instance with the years multiplied by the specified scalar.Years.negated()
Returns a new instance with the years value negated.static Years
Years.parseYears
(String periodStr) Creates a newYears
by parsing a string in the ISO8601 format 'PnY'.Years.plus
(int years) Returns a new instance with the specified number of years added.Returns a new instance with the specified number of years added.static Years
Years.years
(int years) Obtains an instance ofYears
that may be cached.static Years
Years.yearsBetween
(ReadableInstant start, ReadableInstant end) Creates aYears
representing the number of whole years between the two specified datetimes.static Years
Years.yearsBetween
(ReadablePartial start, ReadablePartial end) Creates aYears
representing the number of whole years between the two specified partial datetimes.static Years
Years.yearsIn
(ReadableInterval interval) Creates aYears
representing the number of whole years in the specified interval.Methods in org.joda.time with parameters of type YearsModifier and TypeMethodDescriptionboolean
Years.isGreaterThan
(Years other) Is this years instance greater than the specified number of years.boolean
Years.isLessThan
(Years other) Is this years instance less than the specified number of years.Returns a new instance with the specified number of years taken away.Returns a new instance with the specified number of years added.