Object

org.threeten.bp

DateTimeUtils

Related Doc: package bp

Permalink

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
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DateTimeUtils
  2. AnyRef
  3. 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. final def asInstanceOf[T0]: T0

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink

    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

  17. def toGregorianCalendar(zdt: ZonedDateTime): GregorianCalendar

    Permalink

    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

  18. def toInstant(sqlTimestamp: Timestamp): Instant

    Permalink

    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

  19. def toInstant(utilDate: Date): Instant

    Permalink

    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

  20. def toLocalDate(sqlDate: Date): LocalDate

    Permalink

    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

  21. def toLocalDateTime(sqlTimestamp: Timestamp): LocalDateTime

    Permalink

    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

  22. def toLocalTime(sqlTime: Time): LocalTime

    Permalink

    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

  23. def toSqlDate(date: LocalDate): Date

    Permalink

    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

  24. def toSqlTime(time: LocalTime): Time

    Permalink

    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

  25. def toSqlTimestamp(instant: Instant): Timestamp

    Permalink

    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

  26. def toSqlTimestamp(dateTime: LocalDateTime): Timestamp

    Permalink

    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

  27. def toString(): String

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

    Permalink

    Converts a ZoneId to a TimeZone.

    Converts a ZoneId to a TimeZone.

    zoneId

    the zone, not null

    returns

    the time-zone, not null

  29. def toZoneId(timeZone: TimeZone): ZoneId

    Permalink

    Converts a TimeZone to a ZoneId.

    Converts a TimeZone to a ZoneId.

    timeZone

    the time-zone, not null

    returns

    the zone, not null

  30. def toZonedDateTime(calendar: Calendar): ZonedDateTime

    Permalink

    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

  31. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped