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 YearsYears.MAX_VALUEConstant representing the maximum number of years that can be stored in this object.static final YearsYears.MIN_VALUEConstant representing the minimum number of years that can be stored in this object.static final YearsYears.ONEConstant representing one year.static final YearsYears.THREEConstant representing three years.static final YearsYears.TWOConstant representing two years.static final YearsYears.ZEROConstant 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 YearsYears.parseYears(String periodStr) Creates a newYearsby 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 YearsYears.years(int years) Obtains an instance ofYearsthat may be cached.static YearsYears.yearsBetween(ReadableInstant start, ReadableInstant end) Creates aYearsrepresenting the number of whole years between the two specified datetimes.static YearsYears.yearsBetween(ReadablePartial start, ReadablePartial end) Creates aYearsrepresenting the number of whole years between the two specified partial datetimes.static YearsYears.yearsIn(ReadableInterval interval) Creates aYearsrepresenting the number of whole years in the specified interval.Methods in org.joda.time with parameters of type YearsModifier and TypeMethodDescriptionbooleanYears.isGreaterThan(Years other) Is this years instance greater than the specified number of years.booleanYears.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.