A year in the ISO-8601 calendar system, such as 2007.

See java.time.Year for full documentation

Hierarchy

  • Year

Constructors

Methods

  • Adjusts the specified temporal object to have this year.

    Parameters

    Returns Temporal

  • Combines this year with a day-of-year to create a LocalDate.

    Parameters

    • dayOfYear: number

    Returns LocalDate

  • Combines this year with a month to create a YearMonth.

    Parameters

    • month: number

    Returns YearMonth

  • Combines this year with a month to create a YearMonth.

    Parameters

    Returns YearMonth

  • Combines this year with a month-day to create a LocalDate.

    Parameters

    Returns LocalDate

  • Compares this year to another year.

    Parameters

    Returns number

  • Checks if this year is equal to another year.

    Parameters

    • obj: Object

    Returns boolean

  • Formats this year using the specified formatter.

    Parameters

    Returns string

  • Gets the value of the specified field from this year as an int.

    Parameters

    Returns number

  • Gets the value of the specified field from this year as a long.

    Parameters

    Returns number

  • Gets the year value.

    Returns number

  • Checks if this year is after the specified year.

    Parameters

    Returns boolean

  • Checks if this year is before the specified year.

    Parameters

    Returns boolean

  • Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

    Returns boolean

  • Checks if the specified field is supported.

    Parameters

    Returns boolean

  • Checks if the specified unit is supported.

    Parameters

    Returns boolean

  • Checks if the month-day is valid for this year.

    Parameters

    Returns boolean

  • Gets the length of this year in days.

    Returns number

  • Returns a copy of this year with the specified amount subtracted.

    Parameters

    Returns Year

  • Returns a copy of this year with the specified amount subtracted.

    Parameters

    Returns Year

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

    Parameters

    • yearsToSubtract: number

    Returns Year

  • Returns a copy of this year with the specified amount added.

    Parameters

    Returns Year

  • Returns a copy of this year with the specified amount added.

    Parameters

    Returns Year

  • Returns a copy of this Year with the specified number of years added.

    Parameters

    • yearsToAdd: number

    Returns Year

  • Queries this year using the specified query.

    Type Parameters

    • R

    Parameters

    Returns R

  • Calculates the amount of time until another year in terms of the specified unit.

    Parameters

    Returns number

  • Returns an adjusted copy of this year.

    Parameters

    Returns Year

  • Returns a copy of this year with the specified field set to a new value.

    Parameters

    Returns Year

  • Obtains an instance of Year from a temporal object.

    Parameters

    Returns Year

  • Checks if the year is a leap year, according to the ISO proleptic calendar system rules.

    Parameters

    • year: number

    Returns boolean

  • Obtains the current date-time from the system clock in the default time-zone.

    Parameters

    • Optional clockOrZoneId: Clock | ZoneId

      Obtains the current date-time from the specified clock or the system clock in the specified time-zone.

    Returns Year

  • Obtains an instance of Year.

    Parameters

    • isoYear: number

    Returns Year

  • Obtains an instance of Year from a text string such as 2007.

    Parameters

    Returns Year

Generated using TypeDoc