Package | Description |
---|---|
org.joda.time |
Provides support for dates, times, time zones, durations, intervals, and
partials.
|
org.joda.time.base |
Implementation package providing abstract and base time classes.
|
Modifier and Type | Field | Description |
---|---|---|
static Duration |
Duration.ZERO |
Constant representing zero millisecond duration
|
Modifier and Type | Method | Description |
---|---|---|
Duration |
Duration.minus(long amount) |
Returns a new duration with this length minus that specified.
|
Duration |
Duration.minus(ReadableDuration amount) |
Returns a new duration with this length minus that specified.
|
Duration |
Duration.plus(long amount) |
Returns a new duration with this length plus that specified.
|
Duration |
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 |
Duration.toDuration() |
Get this duration as an immutable
Duration object
by returning this . |
Duration |
ReadableDuration.toDuration() |
Get this duration as an immutable
Duration object. |
Duration |
ReadableInterval.toDuration() |
Gets the millisecond duration of this time interval.
|
Duration |
Days.toStandardDuration() |
Converts this period in days to a duration in milliseconds assuming a
24 hour day, 60 minute hour and 60 second minute.
|
Duration |
Hours.toStandardDuration() |
Converts this period in hours to a duration in milliseconds assuming a
60 minute hour and 60 second minute.
|
Duration |
Minutes.toStandardDuration() |
Converts this period in minutes to a duration in milliseconds assuming a
60 second minute.
|
Duration |
Period.toStandardDuration() |
Converts this period to a duration assuming a
7 day week, 24 hour day, 60 minute hour and 60 second minute.
|
Duration |
Seconds.toStandardDuration() |
Converts this period in seconds to a duration in milliseconds assuming a
24 hour day, 60 minute hour and 60 second minute.
|
Duration |
Weeks.toStandardDuration() |
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 |
Duration.withDurationAdded(long durationToAdd,
int scalar) |
Returns a new duration with this length plus that specified multiplied by the scalar.
|
Duration |
Duration.withDurationAdded(ReadableDuration durationToAdd,
int scalar) |
Returns a new duration with this length plus that specified multiplied by the scalar.
|
Duration |
Duration.withMillis(long duration) |
Creates a new Duration instance with a different milisecond length.
|
Modifier and Type | Method | Description |
---|---|---|
Duration |
AbstractDuration.toDuration() |
Get this duration as an immutable
Duration object. |
Duration |
AbstractInterval.toDuration() |
Gets the duration of this time interval.
|
Duration |
BasePeriod.toDurationFrom(ReadableInstant startInstant) |
Gets the total millisecond duration of this period relative to a start instant.
|
Duration |
BasePeriod.toDurationTo(ReadableInstant endInstant) |
Gets the total millisecond duration of this period relative to an
end instant.
|
Copyright (c) 2001-2006 - Joda.org