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 | Class and Description |
---|---|
class |
Duration
An immutable duration specifying a length of time in milliseconds.
|
Modifier and Type | Method and Description |
---|---|
void |
MutablePeriod.add(ReadableDuration duration)
Adds a duration to this one by dividing the duration into
fields and calling
MutablePeriod.add(ReadablePeriod) . |
void |
ReadWritableInstant.add(ReadableDuration duration)
Adds a duration to this instant.
|
void |
MutableDateTime.add(ReadableDuration duration)
Adds a duration to this instant.
|
void |
ReadWritableInstant.add(ReadableDuration duration,
int scalar)
Adds a duration to this instant specifying how many times to add.
|
void |
MutableDateTime.add(ReadableDuration duration,
int scalar)
Adds a duration to this instant specifying how many times to add.
|
static long |
DateTimeUtils.getDurationMillis(ReadableDuration duration)
Gets the millisecond duration from the specified duration object handling null.
|
boolean |
ReadableDuration.isEqual(ReadableDuration duration)
Is the length of this duration equal to the duration passed in.
|
boolean |
ReadableDuration.isLongerThan(ReadableDuration duration)
Is the length of this duration longer than the duration passed in.
|
boolean |
ReadableDuration.isShorterThan(ReadableDuration duration)
Is the length of this duration shorter than the duration passed in.
|
DateMidnight |
DateMidnight.minus(ReadableDuration duration)
Deprecated.
Returns a copy of this date with the specified duration taken away.
|
DateTime |
DateTime.minus(ReadableDuration duration)
Returns a copy of this datetime with the specified duration taken away.
|
LocalDateTime |
LocalDateTime.minus(ReadableDuration duration)
Returns a copy of this datetime with the specified duration taken away.
|
Instant |
Instant.minus(ReadableDuration duration)
Gets a copy of this instant with the specified duration taken away.
|
Duration |
Duration.minus(ReadableDuration amount)
Returns a new duration with this length minus that specified.
|
DateMidnight |
DateMidnight.plus(ReadableDuration duration)
Deprecated.
Returns a copy of this date with the specified duration added.
|
DateTime |
DateTime.plus(ReadableDuration duration)
Returns a copy of this datetime with the specified duration added.
|
LocalDateTime |
LocalDateTime.plus(ReadableDuration duration)
Returns a copy of this datetime with the specified duration added.
|
Instant |
Instant.plus(ReadableDuration duration)
Gets a copy of this instant with the specified duration added.
|
Duration |
Duration.plus(ReadableDuration amount)
Returns a new duration with this length plus that specified.
|
void |
ReadWritableInterval.setDurationAfterStart(ReadableDuration duration)
Sets the duration of this time interval, preserving the start instant.
|
void |
MutableInterval.setDurationAfterStart(ReadableDuration duration)
Sets the duration of this time interval, preserving the start instant.
|
void |
ReadWritableInterval.setDurationBeforeEnd(ReadableDuration duration)
Sets the duration of this time interval, preserving the end instant.
|
void |
MutableInterval.setDurationBeforeEnd(ReadableDuration duration)
Sets the duration of this time interval, preserving the end instant.
|
void |
MutablePeriod.setPeriod(ReadableDuration duration)
Sets all the fields in one go from a duration dividing the
fields using the period type.
|
void |
MutablePeriod.setPeriod(ReadableDuration duration,
Chronology chrono)
Sets all the fields in one go from a duration dividing the
fields using the period type.
|
DateMidnight |
DateMidnight.withDurationAdded(ReadableDuration durationToAdd,
int scalar)
Deprecated.
Returns a copy of this date with the specified duration added.
|
DateTime |
DateTime.withDurationAdded(ReadableDuration durationToAdd,
int scalar)
Returns a copy of this datetime with the specified duration added.
|
LocalDateTime |
LocalDateTime.withDurationAdded(ReadableDuration durationToAdd,
int scalar)
Returns a copy of this datetime with the specified duration added.
|
Instant |
Instant.withDurationAdded(ReadableDuration durationToAdd,
int scalar)
Gets a copy of this instant with the specified duration added.
|
Duration |
Duration.withDurationAdded(ReadableDuration durationToAdd,
int scalar)
Returns a new duration with this length plus that specified multiplied by the scalar.
|
Interval |
Interval.withDurationAfterStart(ReadableDuration duration)
Creates a new interval with the specified duration after the start instant.
|
Interval |
Interval.withDurationBeforeEnd(ReadableDuration duration)
Creates a new interval with the specified duration before the end instant.
|
Constructor and Description |
---|
Interval(ReadableDuration duration,
ReadableInstant end)
Constructs an interval from a millisecond duration and an end instant.
|
Interval(ReadableInstant start,
ReadableDuration duration)
Constructs an interval from a start instant and a duration.
|
MutableInterval(ReadableDuration duration,
ReadableInstant end)
Constructs an interval from a millisecond duration and an end instant.
|
MutableInterval(ReadableInstant start,
ReadableDuration duration)
Constructs an interval from a start instant and a duration.
|
MutablePeriod(ReadableDuration duration,
ReadableInstant endInstant)
Creates a period from the given duration and end point.
|
MutablePeriod(ReadableDuration duration,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given duration and end point.
|
MutablePeriod(ReadableInstant startInstant,
ReadableDuration duration)
Creates a period from the given start point and the duration.
|
MutablePeriod(ReadableInstant startInstant,
ReadableDuration duration,
PeriodType type)
Creates a period from the given start point and the duration.
|
Period(ReadableDuration duration,
ReadableInstant endInstant)
Creates a period from the given duration and end point.
|
Period(ReadableDuration duration,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given duration and end point.
|
Period(ReadableInstant startInstant,
ReadableDuration duration)
Creates a period from the given start point and the duration.
|
Period(ReadableInstant startInstant,
ReadableDuration duration,
PeriodType type)
Creates a period from the given start point and the duration.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractDuration
AbstractDuration provides the common behaviour for duration classes.
|
class |
BaseDuration
BaseDuration is an abstract implementation of ReadableDuration that stores
data in a
long duration milliseconds field. |
Modifier and Type | Method and Description |
---|---|
int |
AbstractDuration.compareTo(ReadableDuration other)
Compares this duration with the specified duration based on length and direction.
|
boolean |
AbstractDuration.isEqual(ReadableDuration duration)
Is the length of this duration equal to the duration passed in.
|
boolean |
AbstractDuration.isLongerThan(ReadableDuration duration)
Is the length of this duration longer than the duration passed in.
|
boolean |
AbstractDuration.isShorterThan(ReadableDuration duration)
Is the length of this duration shorter than the duration passed in.
|
Constructor and Description |
---|
BaseInterval(ReadableDuration duration,
ReadableInstant end)
Constructs an interval from a millisecond duration and an end instant.
|
BaseInterval(ReadableInstant start,
ReadableDuration duration)
Constructs an interval from a start instant and a duration.
|
BasePeriod(ReadableDuration duration,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given duration and end point.
|
BasePeriod(ReadableInstant startInstant,
ReadableDuration duration,
PeriodType type)
Creates a period from the given start point and duration.
|
Copyright © 2002–2025 Joda.org. All rights reserved.