Uses of Class
net.time4j.range.Years
-
Uses of Years in net.time4j.range
Modifier and TypeFieldDescriptionstatic Years<CalendarUnit>
Years.ONE
Constant for exactly one gregorian year.static Years<CalendarUnit>
Years.ZERO
Constant for zero gregorian years.Modifier and TypeMethodDescriptionstatic Years<CalendarUnit>
Years.between(CalendarMonth m1, CalendarMonth m2)
Determines the difference in years between given calendar months.static Years<CalendarUnit>
Years.between(CalendarQuarter q1, CalendarQuarter q2)
Determines the difference in years between given quarter years.Years.between(CalendarWeek w1, CalendarWeek w2)
Determines the difference in years between given calendar weeks.static Years<CalendarUnit>
Years.between(CalendarYear y1, CalendarYear y2)
Determines the difference in years between given calendar years.static <T extends TimePoint<? super CalendarUnit, T>>
Years<CalendarUnit>Years.between(T t1, T t2)
Determines the temporal distance between given dates/time-points in gregorian years.static Years<CalendarUnit>
Years.ofGregorian(int years)
Obtains a time span in given gregorian years.Years.ofWeekBased(int years)
Obtains a time span in given week-based years.static Years<CalendarUnit>
Years.parseGregorian(String period)
Parses the canonical ISO-8601-format "PnY" with possible preceding minus-char.Years.parseWeekBased(String period)
LikeparseGregorian(period)
but interpretes years as week-based.Modifier and TypeMethodDescriptionCalendarMonth.minus(Years<CalendarUnit> years)
Subtracts given years from this calendar month.CalendarQuarter.minus(Years<CalendarUnit> years)
Subtracts given years from this quarter year.Subtracts given years from this calendar week.CalendarYear.minus(Years<CalendarUnit> years)
Subtracts given years from this year.CalendarMonth.plus(Years<CalendarUnit> years)
Adds given years to this calendar month.CalendarQuarter.plus(Years<CalendarUnit> years)
Adds given years to this quarter year.Adds given years to this calendar week.CalendarYear.plus(Years<CalendarUnit> years)
Adds given years to this year.