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

How to use
java.time.Year
constructor

Best Java code snippets using java.time.Year.<init> (Showing top 1 results out of 315)

origin: com.github.seratch/java-time-backport

/**
 * Obtains an instance of {@code Year}.
 * <p>
 * This method accepts a year value from the proleptic ISO calendar system.
 * <p>
 * The year 2AD/CE is represented by 2.<br>
 * The year 1AD/CE is represented by 1.<br>
 * The year 1BC/BCE is represented by 0.<br>
 * The year 2BC/BCE is represented by -1.<br>
 *
 * @param isoYear  the ISO proleptic year to represent, from {@code MIN_VALUE} to {@code MAX_VALUE}
 * @return the year, not null
 * @throws DateTimeException if the field is invalid
 */
public static Year of(int isoYear) {
  YEAR.checkValidValue(isoYear);
  return new Year(isoYear);
}
java.timeYear<init>

Javadoc

Constructor.

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,
  • minusYears,
  • plus,
  • 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)
  • Best IntelliJ plugins
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