← 返回首页
ChronoUnit (Java SE 26 & JDK 26)
JavaScript is disabled on your browser.
Contents  
  1. Description
  2. Nested Class Summary
  3. Enum Constant Summary
  4. Method Summary
    1. Methods declared in class Enum
    2. Methods declared in class Object
    3. Methods declared in interface TemporalUnit
  5. Enum Constant Details
    1. NANOS
    2. MICROS
    3. MILLIS
    4. SECONDS
    5. MINUTES
    6. HOURS
    7. HALF_DAYS
    8. DAYS
    9. WEEKS
    10. MONTHS
    11. YEARS
    12. DECADES
    13. CENTURIES
    14. MILLENNIA
    15. ERAS
    16. FOREVER
  6. Method Details
    1. values()
    2. valueOf(String)
    3. getDuration()
    4. isDurationEstimated()
    5. isDateBased()
    6. isTimeBased()
    7. addTo(R, long)
    8. between(Temporal, Temporal)
    9. toString()
Hide sidebar  Show sidebar

Enum Class ChronoUnit

java.lang.Object
java.lang.Enum<ChronoUnit>
java.time.temporal.ChronoUnit
All Implemented Interfaces: Serializable, Comparable<ChronoUnit>, Constable, TemporalUnit
public enum ChronoUnit extends Enum<ChronoUnit> implements TemporalUnit
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.

Implementation Requirements: This is a final, immutable and thread-safe enum. Since: 1.8

Scripting on this page tracks web page traffic, but does not change the content in any way.