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.
|
org.joda.time.format |
Provides printing and parsing support for instants and durations.
|
Modifier and Type | Field | Description |
---|---|---|
static Period |
Period.ZERO |
A period of zero length and standard period type.
|
Modifier and Type | Method | Description |
---|---|---|
static Period |
Period.days(int days) |
Create a period with a specified number of days.
|
static Period |
Period.fieldDifference(ReadablePartial start,
ReadablePartial end) |
Creates a period from two partially specified times, calculating
by field difference.
|
static Period |
Period.hours(int hours) |
Create a period with a specified number of hours.
|
static Period |
Period.millis(int millis) |
Create a period with a specified number of millis.
|
Period |
Period.minus(ReadablePeriod period) |
Returns a new period with the specified period subtracted.
|
Period |
Period.minusDays(int days) |
Returns a new period minus the specified number of days taken away.
|
Period |
Period.minusHours(int hours) |
Returns a new period minus the specified number of hours taken away.
|
Period |
Period.minusMillis(int millis) |
Returns a new period minus the specified number of millis taken away.
|
Period |
Period.minusMinutes(int minutes) |
Returns a new period minus the specified number of minutes taken away.
|
Period |
Period.minusMonths(int months) |
Returns a new period minus the specified number of months taken away.
|
Period |
Period.minusSeconds(int seconds) |
Returns a new period minus the specified number of seconds taken away.
|
Period |
Period.minusWeeks(int weeks) |
Returns a new period minus the specified number of weeks taken away.
|
Period |
Period.minusYears(int years) |
Returns a new period with the specified number of years taken away.
|
static Period |
Period.minutes(int minutes) |
Create a period with a specified number of minutes.
|
static Period |
Period.months(int months) |
Create a period with a specified number of months.
|
Period |
Period.normalizedStandard() |
Normalizes this period using standard rules, assuming a 12 month year,
7 day week, 24 hour day, 60 minute hour and 60 second minute.
|
Period |
Period.normalizedStandard(PeriodType type) |
Normalizes this period using standard rules, assuming a 12 month year,
7 day week, 24 hour day, 60 minute hour and 60 second minute,
providing control over how the result is split into fields.
|
Period |
Period.plus(ReadablePeriod period) |
Returns a new period with the specified period added.
|
Period |
Period.plusDays(int days) |
Returns a new period plus the specified number of days added.
|
Period |
Period.plusHours(int hours) |
Returns a new period plus the specified number of hours added.
|
Period |
Period.plusMillis(int millis) |
Returns a new period plus the specified number of millis added.
|
Period |
Period.plusMinutes(int minutes) |
Returns a new period plus the specified number of minutes added.
|
Period |
Period.plusMonths(int months) |
Returns a new period plus the specified number of months added.
|
Period |
Period.plusSeconds(int seconds) |
Returns a new period plus the specified number of seconds added.
|
Period |
Period.plusWeeks(int weeks) |
Returns a new period plus the specified number of weeks added.
|
Period |
Period.plusYears(int years) |
Returns a new period with the specified number of years added.
|
static Period |
Period.seconds(int seconds) |
Create a period with a specified number of seconds.
|
Period |
Period.toPeriod() |
Get this period as an immutable
Period object
by returning this . |
Period |
ReadableDuration.toPeriod() |
Converts this duration to a Period instance using the standard period type
and the ISO chronology.
|
Period |
ReadableInterval.toPeriod() |
Converts the duration of the interval to a period using the
standard period type.
|
Period |
ReadableInterval.toPeriod(PeriodType type) |
Converts the duration of the interval to a period using the
specified period type.
|
Period |
ReadablePeriod.toPeriod() |
Get this period as an immutable
Period object. |
static Period |
Period.weeks(int weeks) |
Create a period with a specified number of weeks.
|
Period |
Period.withDays(int days) |
Returns a new period with the specified number of days.
|
Period |
Period.withField(DurationFieldType field,
int value) |
Creates a new Period instance with the specified field set to a new value.
|
Period |
Period.withFieldAdded(DurationFieldType field,
int value) |
Creates a new Period instance with the valueToAdd added to the specified field.
|
Period |
Period.withFields(ReadablePeriod period) |
Creates a new Period instance with the fields from the specified period
copied on top of those from this period.
|
Period |
Period.withHours(int hours) |
Returns a new period with the specified number of hours.
|
Period |
Period.withMillis(int millis) |
Returns a new period with the specified number of millis.
|
Period |
Period.withMinutes(int minutes) |
Returns a new period with the specified number of minutes.
|
Period |
Period.withMonths(int months) |
Returns a new period with the specified number of months.
|
Period |
Period.withPeriodType(PeriodType type) |
Creates a new Period instance with the same field values but
different PeriodType.
|
Period |
Period.withSeconds(int seconds) |
Returns a new period with the specified number of seconds.
|
Period |
Period.withWeeks(int weeks) |
Returns a new period with the specified number of weeks.
|
Period |
Period.withYears(int years) |
Returns a new period with the specified number of years.
|
static Period |
Period.years(int years) |
Create a period with a specified number of years.
|
Modifier and Type | Method | Description |
---|---|---|
Period |
AbstractDuration.toPeriod() |
Converts this duration to a Period instance using the standard period type
and the ISO chronology.
|
Period |
AbstractInterval.toPeriod() |
Converts the duration of the interval to a
Period using the
All period type. |
Period |
AbstractInterval.toPeriod(PeriodType type) |
Converts the duration of the interval to a
Period using the
specified period type. |
Period |
AbstractPeriod.toPeriod() |
Get this period as an immutable
Period object. |
Period |
BaseDuration.toPeriod(Chronology chrono) |
Converts this duration to a Period instance using the standard period type
and the specified chronology.
|
Period |
BaseDuration.toPeriod(PeriodType type) |
Converts this duration to a Period instance using the specified period type
and the ISO chronology.
|
Period |
BaseDuration.toPeriod(PeriodType type,
Chronology chrono) |
Converts this duration to a Period instance using the specified period type
and chronology.
|
Period |
BaseSingleFieldPeriod.toPeriod() |
Get this period as an immutable
Period object. |
Period |
BaseDuration.toPeriodFrom(ReadableInstant startInstant) |
Converts this duration to a Period instance by adding the duration to a start
instant to obtain an interval using the standard period type.
|
Period |
BaseDuration.toPeriodFrom(ReadableInstant startInstant,
PeriodType type) |
Converts this duration to a Period instance by adding the duration to a start
instant to obtain an interval.
|
Period |
BaseDuration.toPeriodTo(ReadableInstant endInstant) |
Converts this duration to a Period instance by subtracting the duration
from an end instant to obtain an interval using the standard period
type.
|
Period |
BaseDuration.toPeriodTo(ReadableInstant endInstant,
PeriodType type) |
Converts this duration to a Period instance by subtracting the duration
from an end instant to obtain an interval using the standard period
type.
|
Modifier and Type | Method | Description |
---|---|---|
Period |
PeriodFormatter.parsePeriod(java.lang.String text) |
Parses a period from the given text, returning a new Period.
|
Copyright (c) 2001-2006 - Joda.org