org.threeten.bp

DateTimeUtils

object DateTimeUtils

A set of utilities to assist in bridging the gap to Java 8.

This class is not found in Java SE 8 but provides methods that are.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DateTimeUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

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

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

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

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toDate(instant: Instant): Date

    Converts an Instant to a java.util.Date.

    Converts an Instant to a java.util.Date.

    Fractions of the instant smaller than milliseconds will be dropped.

    instant

    the instant, not null

    returns

    the util date, not null

    Exceptions thrown
    IllegalArgumentException

    if the conversion fails

  19. def toGregorianCalendar(zdt: ZonedDateTime): GregorianCalendar

    Converts a ZonedDateTime to a Calendar.

    Converts a ZonedDateTime to a Calendar.

    The resulting GregorianCalendar is pure Gregorian and uses ISO week definitions, starting on Monday and with 4 days in a minimal week.

    Fractions of the instant smaller than milliseconds will be dropped.

    zdt

    the zoned date-time, not null

    returns

    the calendar, not null

    Exceptions thrown
    IllegalArgumentException

    if the conversion fails

  20. def toInstant(sqlTimestamp: Timestamp): Instant

    Converts a java.sql.Timestamp to an Instant.

    Converts a java.sql.Timestamp to an Instant.

    sqlTimestamp

    the SQL timestamp, not null

    returns

    the instant, not null

  21. def toInstant(utilDate: Date): Instant

    Converts a java.util.Date to an Instant.

    Converts a java.util.Date to an Instant.

    utilDate

    the util date, not null

    returns

    the instant, not null

  22. def toLocalDate(sqlDate: Date): LocalDate

    Converts a java.sql.Date to a LocalDate.

    Converts a java.sql.Date to a LocalDate.

    sqlDate

    the SQL date, not null

    returns

    the local date, not null

  23. def toLocalDateTime(sqlTimestamp: Timestamp): LocalDateTime

    Converts a java.sql.Timestamp to a LocalDateTime.

    Converts a java.sql.Timestamp to a LocalDateTime.

    sqlTimestamp

    the SQL timestamp, not null

    returns

    the local date-time, not null

  24. def toLocalTime(sqlTime: Time): LocalTime

    Converts a java.sql.Time to a LocalTime.

    Converts a java.sql.Time to a LocalTime.

    sqlTime

    the SQL time, not null

    returns

    the local time, not null

  25. def toSqlDate(date: LocalDate): Date

    Converts a LocalDate to a java.sql.Date.

    Converts a LocalDate to a java.sql.Date.

    date

    the local date, not null

    returns

    the SQL date, not null

  26. def toSqlTime(time: LocalTime): Time

    Converts a LocalTime to a java.sql.Time.

    Converts a LocalTime to a java.sql.Time.

    time

    the local time, not null

    returns

    the SQL time, not null

  27. def toSqlTimestamp(instant: Instant): Timestamp

    Converts an Instant to a java.sql.Timestamp.

    Converts an Instant to a java.sql.Timestamp.

    instant

    the instant, not null

    returns

    the SQL timestamp, not null

  28. def toSqlTimestamp(dateTime: LocalDateTime): Timestamp

    Converts a LocalDateTime to a java.sql.Timestamp.

    Converts a LocalDateTime to a java.sql.Timestamp.

    dateTime

    the local date-time, not null

    returns

    the SQL timestamp, not null

  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. def toTimeZone(zoneId: ZoneId): TimeZone

    Converts a ZoneId to a TimeZone.

    Converts a ZoneId to a TimeZone.

    zoneId

    the zone, not null

    returns

    the time-zone, not null

  31. def toZoneId(timeZone: TimeZone): ZoneId

    Converts a TimeZone to a ZoneId.

    Converts a TimeZone to a ZoneId.

    timeZone

    the time-zone, not null

    returns

    the zone, not null

  32. def toZonedDateTime(calendar: Calendar): ZonedDateTime

    Converts a Calendar to a ZonedDateTime.

    Converts a Calendar to a ZonedDateTime.

    Note that GregorianCalendar supports a Julian-Gregorian cutover date and ZonedDateTime does not so some differences will occur.

    calendar

    the calendar, not null

    returns

    the instant, not null

  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped