A date-time with a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30+01:00 Europe/Paris.

See java.time.ZonedDateTime for full documentation

Hierarchy

  • ZonedDateTime

Constructors

Methods

  • Formats this date-time using the specified formatter.

    Parameters

    Returns string

  • Gets the value of the specified field from this date-time as an int.

    Parameters

    Returns number

  • Gets the day-of-month field. The first day of the month is 1.

    Returns number

  • Gets the day-of-week field, which is an enum DayOfWeek. Use the method getValue() to extract the numeric value of the day Remember that "Monday" has a getValue of 1, and "Sunday" a getValue of 7

    Returns DayOfWeek

  • Gets the day-of-year field. The minimum value of this is 1, and the max is 365 or 366 depending on if it is a leapyear

    Returns number

  • Gets the hour-of-day field.

    Returns number

  • Gets the value of the specified field from this date-time as a long.

    Parameters

    Returns number

  • Gets the minute-of-hour field.

    Returns number

  • Gets the month-of-year field using the Month enum.

    Returns Month

  • Gets the month-of-year field from 1 to 12.

    Returns number

  • Gets the nano-of-second field.

    Returns number

  • Gets the zone offset, such as '+01:00'.

    Returns ZoneOffset

  • Gets the second-of-minute field.

    Returns number

  • Gets the year field.

    Returns number

  • Gets the time-zone, such as 'Europe/Paris'.

    Returns ZoneId

  • Checks if the specified field is supported.

    Parameters

    Returns boolean

  • Checks if the specified unit is supported.

    Parameters

    Returns boolean

  • Returns a copy of this date-time with the specified amount subtracted.

    Parameters

    Returns ZonedDateTime

  • Returns a copy of this date-time with the specified amount subtracted.

    Parameters

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of days subtracted.

    Parameters

    • days: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of hours subtracted.

    Parameters

    • hours: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of minutes subtracted.

    Parameters

    • minutes: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of months subtracted.

    Parameters

    • months: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of nanoseconds subtracted.

    Parameters

    • nanos: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of seconds subtracted.

    Parameters

    • seconds: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of weeks subtracted.

    Parameters

    • weeks: number

    Returns ZonedDateTime

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

    Parameters

    • years: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of days added.

    Parameters

    • days: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of hours added.

    Parameters

    • hours: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of minutes added.

    Parameters

    • minutes: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of months added.

    Parameters

    • months: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of nanoseconds added.

    Parameters

    • nanos: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of seconds added.

    Parameters

    • seconds: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the specified number of weeks added.

    Parameters

    • weeks: number

    Returns ZonedDateTime

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

    Parameters

    • years: number

    Returns ZonedDateTime

  • Queries this date-time using the specified query.

    Type Parameters

    • R

    Parameters

    Returns R

  • Gets the Instant representation of this date-time.

    Returns Instant

  • Gets the LocalDate part of this date-time.

    Returns LocalDate

  • Gets the LocalTime part of this date-time.

    Returns LocalTime

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

    Parameters

    Returns number

  • Returns a copy of this ZonedDateTime with the day-of-month altered.

    Parameters

    • dayOfMonth: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the day-of-year altered.

    Parameters

    • dayOfYear: number

    Returns ZonedDateTime

  • Returns a copy of this date-time changing the zone offset to the earlier of the two valid offsets at a local time-line overlap.

    Returns ZonedDateTime

  • Returns a copy of this date-time with the zone ID set to the offset.

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the hour-of-day altered.

    Parameters

    • hour: number

    Returns ZonedDateTime

  • Returns a copy of this date-time changing the zone offset to the later of the two valid offsets at a local time-line overlap.

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the minute-of-hour altered.

    Parameters

    • minute: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the month-of-year altered.

    Parameters

    • month: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the nano-of-second altered.

    Parameters

    • nanoOfSecond: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the second-of-minute altered.

    Parameters

    • second: number

    Returns ZonedDateTime

  • Returns a copy of this ZonedDateTime with the year altered.

    Parameters

    • year: number

    Returns ZonedDateTime

  • Returns a copy of this date-time with a different time-zone, retaining the instant.

    Parameters

    Returns ZonedDateTime

  • Returns a copy of this date-time with a different time-zone, retaining the local date-time if possible.

    Parameters

    Returns ZonedDateTime

  • 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 ZonedDateTime

  • Obtains an instance of ZonedDateTime from a year, month, day, hour, minute, second, nanosecond and time-zone.

    Parameters

    • year: number
    • month: number
    • dayOfMonth: number
    • hour: number
    • minute: number
    • second: number
    • nanoOfSecond: number
    • zone: ZoneId

    Returns ZonedDateTime

  • Obtains an instance of ZonedDateTime from a local date and time.

    Parameters

    Returns ZonedDateTime

  • Obtains an instance of ZonedDateTime from a local date-time.

    Parameters

    Returns ZonedDateTime

  • Obtains an instance of ZonedDateTime from a local date-time using the preferred offset if possible.

    Parameters

    Returns ZonedDateTime

  • Obtains an instance of ZonedDateTime strictly validating the combination of local date-time, offset and zone ID.

    Parameters

    Returns ZonedDateTime

  • Obtains an instance of ZonedDateTime from a text string such as 2007-12-03T10:15:30+01:00[Europe/Paris].

    Parameters

    Returns ZonedDateTime

Generated using TypeDoc