All Implemented Interfaces:
Serializable, Comparable<OffsetDateTime>, Temporal, TemporalAccessor, TemporalAdjuster

  • Field Summary

    Fields

    The maximum supported OffsetDateTime, '+999999999-12-31T23:59:59.999999999-18:00'.

    The minimum supported OffsetDateTime, '-999999999-01-01T00:00:00+18:00'.

  • Method Summary

    Adjusts the specified temporal object to have the same offset, date and time as this object.

    Combines this date-time with a time-zone to create a ZonedDateTime ensuring that the result has the same instant.

    Combines this date-time with a time-zone to create a ZonedDateTime trying to keep the same local date and time.

    int

    Compares this date-time to another date-time.

    boolean

    Checks if this date-time is equal to another date-time.

    Formats this date-time using the specified formatter.

    Obtains an instance of OffsetDateTime from a temporal object.

    int

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

    int

    Gets the day-of-month field.

    Gets the day-of-week field, which is an enum DayOfWeek.

    int

    Gets the day-of-year field.

    int

    getHour()

    Gets the hour-of-day field.

    long

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

    int

    getMinute()

    Gets the minute-of-hour field.

    getMonth()

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

    int

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

    int

    getNano()

    Gets the nano-of-second field.

    getOffset()

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

    int

    getSecond()

    Gets the second-of-minute field.

    int

    getYear()

    int

    hashCode()

    A hash code for this date-time.

    boolean

    Checks if the instant of this date-time is after that of the specified date-time.

    boolean

    Checks if the instant of this date-time is before that of the specified date-time.

    boolean

    Checks if the instant of this date-time is equal to that of the specified date-time.

    boolean

    Checks if the specified field is supported.

    boolean

    Checks if the specified unit is supported.

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

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

    minusDays(long days)

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

    minusHours(long hours)

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

    minusMinutes(long minutes)

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

    minusMonths(long months)

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

    minusNanos(long nanos)

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

    minusSeconds(long seconds)

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

    minusWeeks(long weeks)

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

    minusYears(long years)

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

    now()

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

    Obtains the current date-time from the specified clock.

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

    of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneOffset offset)

    Obtains an instance of OffsetDateTime from a year, month, day, hour, minute, second, nanosecond and offset.

    Obtains an instance of OffsetDateTime from a date, time and offset.

    Obtains an instance of OffsetDateTime from a date-time and offset.

    Obtains an instance of OffsetDateTime from an Instant and zone ID.

    Obtains an instance of OffsetDateTime from a text string such as 2007-12-03T10:15:30+01:00.

    Obtains an instance of OffsetDateTime from a text string using a specific formatter.

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

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

    plusDays(long days)

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

    plusHours(long hours)

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

    plusMinutes(long minutes)

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

    plusMonths(long months)

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

    plusNanos(long nanos)

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

    plusSeconds(long seconds)

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

    plusWeeks(long weeks)

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

    plusYears(long years)

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

    <R> R

    Queries this date-time using the specified query.

    Gets the range of valid values for the specified field.

    Gets a comparator that compares two OffsetDateTime instances based solely on the instant.

    long

    Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.

    toInstant()

    Converts this date-time to an Instant.

    Gets the LocalDate part of this date-time.

    Gets the LocalDateTime part of this date-time.

    Gets the LocalTime part of this date-time.

    Converts this date-time to an OffsetTime.

    toString()

    Outputs this date-time as a String, such as 2007-12-03T10:15:30+01:00.

    Converts this date-time to a ZonedDateTime using the offset as the zone ID.

    Returns a copy of this OffsetDateTime with the time truncated.

    long

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

    Returns an adjusted copy of this date-time.

    Returns a copy of this date-time with the specified field set to a new value.

    withDayOfMonth(int dayOfMonth)

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

    withDayOfYear(int dayOfYear)

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

    withHour(int hour)

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

    withMinute(int minute)

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

    withMonth(int month)

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

    withNano(int nanoOfSecond)

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

    Returns a copy of this OffsetDateTime with the specified offset ensuring that the result is at the same instant.

    Returns a copy of this OffsetDateTime with the specified offset ensuring that the result has the same local date-time.

    withSecond(int second)

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

    withYear(int year)

    Returns a copy of this OffsetDateTime with the year altered.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Field Details

    • MIN

    • MAX

  • Method Details

    • timeLineOrder

    • now

    • now

    • now

    • of

    • of

    • of

    • ofInstant

    • from

    • parse

    • parse

    • isSupported

    • isSupported

    • range

    • get

    • getLong

    • getOffset

    • withOffsetSameLocal

    • withOffsetSameInstant

    • toLocalDateTime

    • toLocalDate

    • getYear

    • getMonthValue

    • getMonth

    • getDayOfMonth

    • getDayOfYear

    • getDayOfWeek

    • toLocalTime

    • getHour

    • getMinute

    • getSecond

    • getNano

    • with

    • with

    • withYear

    • withMonth

    • withDayOfMonth

    • withDayOfYear

    • withHour

    • withMinute

    • withSecond

    • withNano

    • truncatedTo

    • plus

    • plus

    • plusYears

    • plusMonths

    • plusWeeks

    • plusDays

    • plusHours

    • plusMinutes

    • plusSeconds

    • plusNanos

    • minus

    • minus

    • minusYears

    • minusMonths

    • minusWeeks

    • minusDays

    • minusHours

    • minusMinutes

    • minusSeconds

    • minusNanos

    • query

    • adjustInto

    • until

    • format

    • atZoneSameInstant

    • atZoneSimilarLocal

    • toOffsetTime

    • toZonedDateTime

    • toInstant

    • toEpochSecond

    • compareTo

    • isAfter

    • isBefore

    • isEqual

    • equals

    • hashCode

    • toString