- All Superinterfaces:
TemporalAmount
Represents temporal amount containing months, days, seconds and nanoseconds of the second. A duration can be negative.
Value that represents a duration can be created using Values.isoDuration(long, long, long, int)
method.
-
Method Summary
Methods inherited from interface java.time.temporal.TemporalAmount
addTo, get, getUnits, subtractFrom
-
Method Details
-
months
long months()Retrieve amount of months in this duration.- Returns:
- number of months.
-
days
long days()Retrieve amount of days in this duration.- Returns:
- number of days.
-
seconds
long seconds()Retrieve amount of seconds in this duration.- Returns:
- number of seconds.
-
nanoseconds
int nanoseconds()Retrieve amount of nanoseconds of the second in this duration.- Returns:
- number of nanoseconds.
-