Uses of Class
org.joda.time.Duration

Packages that use Duration
Package
Description
Provides support for dates, times, time zones, durations, intervals, and partials.
Implementation package providing abstract and base time classes.
  • Uses of Duration in org.joda.time

    Fields in org.joda.time declared as Duration
    Modifier and Type
    Field
    Description
    static final Duration
    Duration.ZERO
    Constant representing zero millisecond duration
    Methods in org.joda.time that return Duration
    Modifier and Type
    Method
    Description
    Duration.abs()
    Returns a duration that has a positive or zero number of milliseconds.
    Duration.dividedBy(long divisor)
    Returns a new duration with this length divided by the specified divisor.
    Duration.dividedBy(long divisor, RoundingMode roundingMode)
    Returns a new duration with its length divided by the specified divisor.
    static Duration
    Duration.millis(long millis)
    Create a duration with the specified number of milliseconds.
    Duration.minus(long amount)
    Returns a new duration with this length minus that specified.
    Duration.minus(ReadableDuration amount)
    Returns a new duration with this length minus that specified.
    Duration.multipliedBy(long multiplicand)
    Returns a new duration with this length multiplied by the specified multiplicand.
    Duration.negated()
    Returns a new duration with this length negated.
    static Duration
    Duration.parse(String str)
    Parses a Duration from the specified string.
    Duration.plus(long amount)
    Returns a new duration with this length plus that specified.
    Duration.plus(ReadableDuration amount)
    Returns a new duration with this length plus that specified.
    static Duration
    Duration.standardDays(long days)
    Create a duration with the specified number of days assuming that there are the standard number of milliseconds in a day.
    static Duration
    Duration.standardHours(long hours)
    Create a duration with the specified number of hours assuming that there are the standard number of milliseconds in an hour.
    static Duration
    Duration.standardMinutes(long minutes)
    Create a duration with the specified number of minutes assuming that there are the standard number of milliseconds in a minute.
    static Duration
    Duration.standardSeconds(long seconds)
    Create a duration with the specified number of seconds assuming that there are the standard number of milliseconds in a second.
    Duration.toDuration()
    Get this duration as an immutable Duration object by returning this.
    ReadableDuration.toDuration()
    Get this duration as an immutable Duration object.
    ReadableInterval.toDuration()
    Gets the millisecond duration of this time interval.
    Converts this period in days to a duration in milliseconds assuming a 24 hour day, 60 minute hour and 60 second minute.
    Converts this period in hours to a duration in milliseconds assuming a 60 minute hour and 60 second minute.
    Converts this period in minutes to a duration in milliseconds assuming a 60 second minute.
    Converts this period to a duration assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
    Converts this period in seconds to a duration in milliseconds assuming a 24 hour day, 60 minute hour and 60 second minute.
    Converts this period in weeks to a duration in milliweeks assuming a 7 day week, 24 hour day, 60 minute hour and 60 second minute.
    Duration.withDurationAdded(long durationToAdd, int scalar)
    Returns a new duration with this length plus that specified multiplied by the scalar.
    Duration.withDurationAdded(ReadableDuration durationToAdd, int scalar)
    Returns a new duration with this length plus that specified multiplied by the scalar.
    Duration.withMillis(long duration)
    Creates a new Duration instance with a different millisecond length.
  • Uses of Duration in org.joda.time.base

    Methods in org.joda.time.base that return Duration
    Modifier and Type
    Method
    Description
    AbstractDuration.toDuration()
    Get this duration as an immutable Duration object.
    AbstractInterval.toDuration()
    Gets the duration of this time interval.
    BasePeriod.toDurationFrom(ReadableInstant startInstant)
    Gets the total millisecond duration of this period relative to a start instant.
    BasePeriod.toDurationTo(ReadableInstant endInstant)
    Gets the total millisecond duration of this period relative to an end instant.