Interface IsoDuration

All Superinterfaces:
TemporalAmount

@Immutable public interface IsoDuration extends 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

    Modifier and Type
    Method
    Description
    long
    Retrieve amount of days in this duration.
    long
    Retrieve amount of months in this duration.
    int
    Retrieve amount of nanoseconds of the second in this duration.
    long
    Retrieve amount of seconds in this duration.

    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.