java.time.temporal

ChronoUnit

object ChronoUnit extends Serializable

A standard set of date periods units.

This set of units provide unit-based access to manipulate a date, time or date-time. The standard set of units can be extended by implementing TemporalUnit.

These units are intended to be applicable in multiple calendar systems. For example, most non-ISO calendar systems define units of years, months and days, just with slightly different rules. The documentation of each unit explains how it operates.

Specification for implementors

This is a final, immutable and thread-safe enum.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ChronoUnit
  2. Serializable
  3. Serializable
  4. AnyRef
  5. 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. val CENTURIES: ChronoUnit

    Unit that represents the concept of a century.

    Unit that represents the concept of a century. For the ISO calendar system, it is equal to 100 years.

    When used with other calendar systems it must correspond to an integral number of days and is normally an integral number of years.

  7. val DAYS: ChronoUnit

    Unit that represents the concept of a day.

    Unit that represents the concept of a day. For the ISO calendar system, it is the standard day from midnight to midnight. The estimated duration of a day is 24 Hours.

    When used with other calendar systems it must correspond to the day defined by the rising and setting of the Sun on Earth. It is not required that days begin at midnight - when converting between calendar systems, the date should be equivalent at midday.

  8. val DECADES: ChronoUnit

    Unit that represents the concept of a decade.

    Unit that represents the concept of a decade. For the ISO calendar system, it is equal to 10 years.

    When used with other calendar systems it must correspond to an integral number of days and is normally an integral number of years.

  9. val ERAS: ChronoUnit

    Unit that represents the concept of an era.

    Unit that represents the concept of an era. The ISO calendar system doesn't have eras thus it is impossible to add an era to a date or date-time. The estimated duration of the era is artificially defined as 1,000,000,000 Years.

    When used with other calendar systems there are no restrictions on the unit.

  10. val FOREVER: ChronoUnit

    Artificial unit that represents the concept of forever.

    Artificial unit that represents the concept of forever. This is primarily used with TemporalField to represent unbounded fields such as the year or era. The estimated duration of the era is artificially defined as the largest duration supported by Duration.

  11. val HALF_DAYS: ChronoUnit

    Unit that represents the concept of half a day, as used in AM/PM.

    Unit that represents the concept of half a day, as used in AM/PM. For the ISO calendar system, it is equal to 12 hours.

  12. val HOURS: ChronoUnit

    Unit that represents the concept of an hour.

    Unit that represents the concept of an hour. For the ISO calendar system, it is equal to 60 minutes.

  13. val MICROS: ChronoUnit

    Unit that represents the concept of a microsecond.

    Unit that represents the concept of a microsecond. For the ISO calendar system, it is equal to the 1,000,000th part of the second unit.

  14. val MILLENNIA: ChronoUnit

    Unit that represents the concept of a millennium.

    Unit that represents the concept of a millennium. For the ISO calendar system, it is equal to 1000 years.

    When used with other calendar systems it must correspond to an integral number of days and is normally an integral number of years.

  15. val MILLIS: ChronoUnit

    Unit that represents the concept of a millisecond.

    Unit that represents the concept of a millisecond. For the ISO calendar system, it is equal to the 1000th part of the second unit.

  16. val MINUTES: ChronoUnit

    Unit that represents the concept of a minute.

    Unit that represents the concept of a minute. For the ISO calendar system, it is equal to 60 seconds.

  17. val MONTHS: ChronoUnit

    Unit that represents the concept of a month.

    Unit that represents the concept of a month. For the ISO calendar system, the length of the month varies by month-of-year. The estimated duration of a month is one twelfth of 365.2425 Days.

    When used with other calendar systems it must correspond to an integral number of days.

  18. val NANOS: ChronoUnit

    Unit that represents the concept of a nanosecond, the smallest supported unit of time.

    Unit that represents the concept of a nanosecond, the smallest supported unit of time. For the ISO calendar system, it is equal to the 1,000,000,000th part of the second unit.

  19. val SECONDS: ChronoUnit

    Unit that represents the concept of a second.

    Unit that represents the concept of a second. For the ISO calendar system, it is equal to the second in the SI system of units, except around a leap-second.

  20. val WEEKS: ChronoUnit

    Unit that represents the concept of a week.

    Unit that represents the concept of a week. For the ISO calendar system, it is equal to 7 days.

    When used with other calendar systems it must correspond to an integral number of days.

  21. val YEARS: ChronoUnit

    Unit that represents the concept of a year.

    Unit that represents the concept of a year. For the ISO calendar system, it is equal to 12 months. The estimated duration of a year is 365.2425 Days.

    When used with other calendar systems it must correspond to an integral number of days or months roughly equal to a year defined by the passage of the Earth around the Sun.

  22. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  23. def clone(): AnyRef

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. val values: Array[ChronoUnit]

  36. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped