Object/Class

org.threeten.bp

OffsetDateTime

Related Docs: class OffsetDateTime | package bp

Permalink

object OffsetDateTime extends Serializable

Annotations
@SerialVersionUID()
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OffsetDateTime
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val MAX: OffsetDateTime

    Permalink

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

    The maximum supported OffsetDateTime, '+999999999-12-31T23:59:59.999999999-18:00'. This is the local date-time just before midnight at the end of the maximum date in the minimum offset (larger negative offsets are later on the time-line). This combines LocalDateTime#MAX and ZoneOffset#MIN. This could be used by an application as a "far future" date-time.

  5. val MIN: OffsetDateTime

    Permalink

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

    The minimum supported OffsetDateTime, '-999999999-01-01T00:00:00+18:00'. This is the local date-time of midnight at the start of the minimum date in the maximum offset (larger offsets are earlier on the time-line). This combines LocalDateTime#MIN and ZoneOffset#MAX. This could be used by an application as a "far past" date-time.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def from(temporal: TemporalAccessor): OffsetDateTime

    Permalink

    Obtains an instance of OffsetDateTime from a temporal object.

    Obtains an instance of OffsetDateTime from a temporal object.

    A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of OffsetDateTime.

    The conversion extracts and combines LocalDateTime and ZoneOffset. If that fails it will try to extract and combine Instant and ZoneOffset.

    This method matches the signature of the functional interface TemporalQuery allowing it to be used in queries via method reference, OffsetDateTime::from.

    temporal

    the temporal object to convert, not null

    returns

    the offset date-time, not null

    Exceptions thrown

    DateTimeException if unable to convert to an { @code OffsetDateTime}

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def now(clock: Clock): OffsetDateTime

    Permalink

    Obtains the current date-time from the specified clock.

    Obtains the current date-time from the specified clock.

    This will query the specified clock to obtain the current date-time. The offset will be calculated from the time-zone in the clock.

    Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using dependency injection.

    clock

    the clock to use, not null

    returns

    the current date-time, not null

  19. def now(zone: ZoneId): OffsetDateTime

    Permalink

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

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

    This will query the system clock to obtain the current date-time. Specifying the time-zone avoids dependence on the default time-zone. The offset will be calculated from the specified time-zone.

    Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

    zone

    the zone ID to use, not null

    returns

    the current date-time using the system clock, not null

  20. def now: OffsetDateTime

    Permalink

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

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

    This will query the system clock in the default time-zone to obtain the current date-time. The offset will be calculated from the time-zone in the clock.

    Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

    returns

    the current date-time using the system clock, not null

  21. def of(year: Int, month: Int, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanoOfSecond: Int, offset: ZoneOffset): OffsetDateTime

    Permalink

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

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

    This creates an offset date-time with the seven specified fields.

    This method exists primarily for writing test cases. Non test-code will typically use other methods to create an offset time. LocalDateTime has five additional convenience variants of the equivalent factory method taking fewer arguments. They are not provided here to reduce the footprint of the API.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    month

    the month-of-year to represent, from 1 (January) to 12 (December)

    dayOfMonth

    the day-of-month to represent, from 1 to 31

    hour

    the hour-of-day to represent, from 0 to 23

    minute

    the minute-of-hour to represent, from 0 to 59

    second

    the second-of-minute to represent, from 0 to 59

    nanoOfSecond

    the nano-of-second to represent, from 0 to 999,999,999

    offset

    the zone offset, not null

    returns

    the offset date-time, not null

    Exceptions thrown

    DateTimeException if the value of any field is out of range, or if the day-of-month is invalid for the month-year

  22. def of(dateTime: LocalDateTime, offset: ZoneOffset): OffsetDateTime

    Permalink

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

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

    This creates an offset date-time with the specified local date-time and offset.

    dateTime

    the local date-time, not null

    offset

    the zone offset, not null

    returns

    the offset date-time, not null

  23. def of(date: LocalDate, time: LocalTime, offset: ZoneOffset): OffsetDateTime

    Permalink

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

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

    This creates an offset date-time with the specified local date, time and offset.

    date

    the local date, not null

    time

    the local time, not null

    offset

    the zone offset, not null

    returns

    the offset date-time, not null

  24. def ofInstant(instant: Instant, zone: ZoneId): OffsetDateTime

    Permalink

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

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

    This creates an offset date-time with the same instant as that specified. Finding the offset from UTC/Greenwich is simple as there is only one valid offset for each instant.

    instant

    the instant to create the date-time from, not null

    zone

    the time-zone, which may be an offset, not null

    returns

    the offset date-time, not null

    Exceptions thrown

    DateTimeException if the result exceeds the supported range

  25. def parse(text: CharSequence, formatter: DateTimeFormatter): OffsetDateTime

    Permalink

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

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

    The text is parsed using the formatter, returning a date-time.

    text

    the text to parse, not null

    formatter

    the formatter to use, not null

    returns

    the parsed offset date-time, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

  26. def parse(text: CharSequence): OffsetDateTime

    Permalink

    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 such as 2007-12-03T10:15:30+01:00.

    The string must represent a valid date-time and is parsed using org.threeten.bp.format.DateTimeFormatter#ISO_OFFSET_DATE_TIME.

    text

    the text to parse such as "2007-12-03T10:15:30+01:00", not null

    returns

    the parsed offset date-time, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def timeLineOrder: Comparator[OffsetDateTime]

    Permalink

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

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

    This method differs from the comparison in #compareTo in that it only compares the underlying instant.

    returns

    a comparator that compares in time-line order

    See also

    #isEqual

    #isBefore

    #isAfter

  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped