Object/Class

org.threeten.bp

LocalDateTime

Related Docs: class LocalDateTime | package bp

Permalink

object LocalDateTime extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalDateTime
  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. lazy val MAX: LocalDateTime

    Permalink

    The maximum supported LocalDateTime, '+999999999-12-31T23:59:59.999999999'.

    The maximum supported LocalDateTime, '+999999999-12-31T23:59:59.999999999'. This is the local date-time just before midnight at the end of the maximum date. This combines LocalDate#MAX and LocalTime#MAX. This could be used by an application as a "far future" date-time.

  5. lazy val MIN: LocalDateTime

    Permalink

    The minimum supported LocalDateTime, '-999999999-01-01T00:00:00'.

    The minimum supported LocalDateTime, '-999999999-01-01T00:00:00'. This is the local date-time of midnight at the start of the minimum date. This combines LocalDate#MIN and LocalTime#MIN. 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): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from a temporal object.

    Obtains an instance of LocalDateTime 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 LocalDateTime.

    The conversion extracts and combines LocalDate and LocalTime.

    This method matches the signature of the functional interface TemporalQuery allowing it to be used as a query via method reference, LocalDateTime::from.

    temporal

    the temporal object to convert, not null

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if unable to convert to a { @code LocalDateTime}

  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): LocalDateTime

    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. 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): LocalDateTime

    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.

    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: LocalDateTime

    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.

    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 and default time-zone, not null

  21. def of(date: LocalDate, time: LocalTime): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from a date and time.

    Obtains an instance of LocalDateTime from a date and time.

    date

    the local date, not null

    time

    the local time, not null

    returns

    the local date-time, not null

  22. def of(year: Int, month: Int, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanoOfSecond: Int): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from year, month, day, hour, minute, second and nanosecond.

    Obtains an instance of LocalDateTime from year, month, day, hour, minute, second and nanosecond.

    The day must be valid for the year and month, otherwise an exception will be thrown.

    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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the day-of-month is invalid for the month-year

  23. def of(year: Int, month: Int, dayOfMonth: Int, hour: Int, minute: Int, second: Int): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from year, month, day, hour, minute and second, setting the nanosecond to zero.

    Obtains an instance of LocalDateTime from year, month, day, hour, minute and second, setting the nanosecond to zero.

    The day must be valid for the year and month, otherwise an exception will be thrown. The nanosecond field will be set to zero.

    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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the day-of-month is invalid for the month-year

  24. def of(year: Int, month: Int, dayOfMonth: Int, hour: Int, minute: Int): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from year, month, day, hour and minute, setting the second and nanosecond to zero.

    Obtains an instance of LocalDateTime from year, month, day, hour and minute, setting the second and nanosecond to zero.

    The day must be valid for the year and month, otherwise an exception will be thrown. The second and nanosecond fields will be set to zero.

    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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the day-of-month is invalid for the month-year

  25. def of(year: Int, month: Month, dayOfMonth: Int, hour: Int, minute: Int, second: Int, nanoOfSecond: Int): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from year, month, day, hour, minute, second and nanosecond.

    Obtains an instance of LocalDateTime from year, month, day, hour, minute, second and nanosecond.

    The day must be valid for the year and month, otherwise an exception will be thrown.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    month

    the month-of-year to represent, not null

    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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the day-of-month is invalid for the month-year

  26. def of(year: Int, month: Month, dayOfMonth: Int, hour: Int, minute: Int, second: Int): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from year, month, day, hour, minute and second, setting the nanosecond to zero.

    Obtains an instance of LocalDateTime from year, month, day, hour, minute and second, setting the nanosecond to zero.

    The day must be valid for the year and month, otherwise an exception will be thrown. The nanosecond field will be set to zero.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    month

    the month-of-year to represent, not null

    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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the day-of-month is invalid for the month-year

  27. def of(year: Int, month: Month, dayOfMonth: Int, hour: Int, minute: Int): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from year, month, day, hour and minute, setting the second and nanosecond to zero.

    Obtains an instance of LocalDateTime from year, month, day, hour and minute, setting the second and nanosecond to zero.

    The day must be valid for the year and month, otherwise an exception will be thrown. The second and nanosecond fields will be set to zero.

    year

    the year to represent, from MIN_YEAR to MAX_YEAR

    month

    the month-of-year to represent, not null

    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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the day-of-month is invalid for the month-year

  28. def ofEpochSecond(epochSecond: Long, nanoOfSecond: Int, offset: ZoneOffset): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime using seconds from the epoch of 1970-01-01T00:00:00Z.

    Obtains an instance of LocalDateTime using seconds from the epoch of 1970-01-01T00:00:00Z.

    This allows the epoch-second field to be converted to a local date-time. This is primarily intended for low-level conversions rather than general application usage.

    epochSecond

    the number of seconds from the epoch of 1970-01-01T00:00:00Z

    nanoOfSecond

    the nanosecond within the second, from 0 to 999,999,999

    offset

    the zone offset, not null

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the result exceeds the supported range

  29. def ofInstant(instant: Instant, zone: ZoneId): LocalDateTime

    Permalink

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

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

    This creates a local date-time based on the specified instant. First, the offset from UTC/Greenwich is obtained using the zone ID and instant, which is simple as there is only one valid offset for each instant. Then, the instant and offset are used to calculate the local date-time.

    instant

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

    zone

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

    returns

    the local date-time, not null

    Exceptions thrown

    DateTimeException if the result exceeds the supported range

  30. def parse(text: CharSequence, formatter: DateTimeFormatter): LocalDateTime

    Permalink

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

    Obtains an instance of LocalDateTime 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 local date-time, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

  31. def parse(text: CharSequence): LocalDateTime

    Permalink

    Obtains an instance of LocalDateTime from a text string such as 2007-12-03T10:15:30.

    Obtains an instance of LocalDateTime from a text string such as 2007-12-03T10:15:30.

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

    text

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

    returns

    the parsed local date-time, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

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

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. 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