congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Year.minusYears
Code IndexAdd Tabnine to your IDE (free)

How to use
minusYears
method
in
java.time.Year

Best Java code snippets using java.time.Year.minusYears (Showing top 2 results out of 315)

origin: org.codehaus.groovy/groovy-datetime

/**
 * Returns a {@link java.time.Year} that is {@code years} years before this year.
 *
 * @param self  a Year
 * @param years the number of years to subtract
 * @return a Year
 * @since 2.5.0
 */
public static Year minus(final Year self, long years) {
  return self.minusYears(years);
}
origin: org.xbib/ftp-client

} else {
  if (month > Month.from(ZonedDateTime.now()).getValue()) {
    year = year.minusYears(1L);
java.timeYearminusYears

Javadoc

Returns a copy of this year with the specified number of years subtracted.

This instance is immutable and unaffected by this method call.

Popular methods of Year

  • of
    Obtains an instance of Year. This method accepts a year value from the proleptic ISO calendar system
  • getValue
    Gets the year value. The year returned by this method is proleptic as per get(YEAR).
  • parse
    Obtains an instance of Year from a text string using a specific formatter. The text is parsed using
  • now
    Obtains the current year from the system clock in the specified time-zone. This will query the Clock
  • toString
    Outputs this year as a String.
  • atDay
    Combines this year with a day-of-year to create a LocalDate. This returns a LocalDate formed from th
  • from
    Obtains an instance of Year from a temporal object. A TemporalAccessor represents some form of date
  • isLeap
    Checks if the year is a leap year, according to the ISO proleptic calendar system rules. This method
  • atMonthDay
    Combines this year with a month-day to create a LocalDate. This returns a LocalDate formed from this
  • format
    Outputs this year as a String using the formatter. This year will be passed to the formatter DateTim
  • atMonth
    Combines this year with a month to create a YearMonth. This returns a YearMonth formed from this yea
  • compareTo
    Compares this year to another year. The comparison is based on the value of the year. It is "consist
  • atMonth,
  • compareTo,
  • plusYears,
  • getLong,
  • plus,
  • <init>,
  • get,
  • length,
  • range

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JList (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now