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.convert |
Implementation package providing conversion between date and time objects.
|
org.joda.time.format |
Provides printing and parsing support for instants and durations.
|
Modifier and Type | Method and Description |
---|---|
static PeriodType |
PeriodType.days()
Gets a type that defines just the days field.
|
static PeriodType |
PeriodType.dayTime()
Gets a type that defines all standard fields from days downwards.
|
static PeriodType |
PeriodType.forFields(DurationFieldType[] types)
Gets a period type that contains the duration types of the array.
|
PeriodType |
Weeks.getPeriodType()
Gets the period type, which is
weeks . |
PeriodType |
Months.getPeriodType()
Gets the period type, which is
months . |
PeriodType |
ReadablePeriod.getPeriodType()
Gets the period type that defines which fields are included in the period.
|
PeriodType |
Minutes.getPeriodType()
Gets the period type, which is
minutes . |
PeriodType |
Seconds.getPeriodType()
Gets the period type, which is
seconds . |
PeriodType |
Years.getPeriodType()
Gets the period type, which is
years . |
PeriodType |
Days.getPeriodType()
Gets the period type, which is
days . |
PeriodType |
Hours.getPeriodType()
Gets the period type, which is
hours . |
static PeriodType |
DateTimeUtils.getPeriodType(PeriodType type)
Gets the period type handling null.
|
static PeriodType |
PeriodType.hours()
Gets a type that defines just the hours field.
|
static PeriodType |
PeriodType.millis()
Gets a type that defines just the millis field.
|
static PeriodType |
PeriodType.minutes()
Gets a type that defines just the minutes field.
|
static PeriodType |
PeriodType.months()
Gets a type that defines just the months field.
|
static PeriodType |
PeriodType.seconds()
Gets a type that defines just the seconds field.
|
static PeriodType |
PeriodType.standard()
Gets a type that defines all standard fields.
|
static PeriodType |
PeriodType.time()
Gets a type that defines all standard time fields.
|
static PeriodType |
PeriodType.weeks()
Gets a type that defines just the weeks field.
|
PeriodType |
PeriodType.withDaysRemoved()
Returns a version of this PeriodType instance that does not support days.
|
PeriodType |
PeriodType.withHoursRemoved()
Returns a version of this PeriodType instance that does not support hours.
|
PeriodType |
PeriodType.withMillisRemoved()
Returns a version of this PeriodType instance that does not support milliseconds.
|
PeriodType |
PeriodType.withMinutesRemoved()
Returns a version of this PeriodType instance that does not support minutes.
|
PeriodType |
PeriodType.withMonthsRemoved()
Returns a version of this PeriodType instance that does not support months.
|
PeriodType |
PeriodType.withSecondsRemoved()
Returns a version of this PeriodType instance that does not support seconds.
|
PeriodType |
PeriodType.withWeeksRemoved()
Returns a version of this PeriodType instance that does not support weeks.
|
PeriodType |
PeriodType.withYearsRemoved()
Returns a version of this PeriodType instance that does not support years.
|
static PeriodType |
PeriodType.yearDay()
Gets a type that defines the year and day fields.
|
static PeriodType |
PeriodType.yearDayTime()
Gets a type that defines all standard fields except months and weeks.
|
static PeriodType |
PeriodType.yearMonthDay()
Gets a type that defines the year, month and day fields.
|
static PeriodType |
PeriodType.yearMonthDayTime()
Gets a type that defines all standard fields except weeks.
|
static PeriodType |
PeriodType.years()
Gets a type that defines just the years field.
|
static PeriodType |
PeriodType.yearWeekDay()
Gets a type that defines year, week and day fields.
|
static PeriodType |
PeriodType.yearWeekDayTime()
Gets a type that defines all standard fields except months.
|
Modifier and Type | Method and Description |
---|---|
static PeriodType |
DateTimeUtils.getPeriodType(PeriodType type)
Gets the period type handling null.
|
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 |
ReadableInterval.toPeriod(PeriodType type)
Converts the duration of the interval to a period using the
specified period type.
|
Period |
Period.withPeriodType(PeriodType type)
Creates a new Period instance with the same field values but
different PeriodType.
|
Constructor and Description |
---|
MutablePeriod(int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis,
PeriodType type)
Create a period from a set of field values.
|
MutablePeriod(long startInstant,
long endInstant,
PeriodType type)
Creates a period from the given interval endpoints.
|
MutablePeriod(long startInstant,
long endInstant,
PeriodType type,
Chronology chrono)
Creates a period from the given interval endpoints.
|
MutablePeriod(long duration,
PeriodType type)
Creates a period from the given millisecond duration.
|
MutablePeriod(long duration,
PeriodType type,
Chronology chronology)
Creates a period from the given millisecond duration.
|
MutablePeriod(Object period,
PeriodType type)
Creates a period by converting or copying from another object.
|
MutablePeriod(Object period,
PeriodType type,
Chronology chrono)
Creates a period by converting or copying from another object.
|
MutablePeriod(PeriodType type)
Creates a zero-length period using the specified period type.
|
MutablePeriod(ReadableDuration duration,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given duration and end point.
|
MutablePeriod(ReadableInstant startInstant,
ReadableDuration duration,
PeriodType type)
Creates a period from the given start point and the duration.
|
MutablePeriod(ReadableInstant startInstant,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given interval endpoints.
|
Period(int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis,
PeriodType type)
Create a period from a set of field values.
|
Period(long startInstant,
long endInstant,
PeriodType type)
Creates a period from the given interval endpoints.
|
Period(long startInstant,
long endInstant,
PeriodType type,
Chronology chrono)
Creates a period from the given interval endpoints.
|
Period(long duration,
PeriodType type)
Creates a period from the given millisecond duration.
|
Period(long duration,
PeriodType type,
Chronology chronology)
Creates a period from the given millisecond duration.
|
Period(Object period,
PeriodType type)
Creates a period by converting or copying from another object.
|
Period(Object period,
PeriodType type,
Chronology chrono)
Creates a period by converting or copying from another object.
|
Period(ReadableDuration duration,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given duration and end point.
|
Period(ReadableInstant startInstant,
ReadableDuration duration,
PeriodType type)
Creates a period from the given start point and the duration.
|
Period(ReadableInstant startInstant,
ReadableInstant endInstant,
PeriodType type)
Creates a period between the given instants.
|
Period(ReadablePartial start,
ReadablePartial end,
PeriodType type)
Creates a period from two partially specified times.
|
Modifier and Type | Method and Description |
---|---|
protected PeriodType |
BasePeriod.checkPeriodType(PeriodType type)
Validates a period type, converting nulls to a default value and
checking the type is suitable for this instance.
|
abstract PeriodType |
BaseSingleFieldPeriod.getPeriodType()
Gets the period type which matches the duration field type.
|
PeriodType |
BasePeriod.getPeriodType()
Gets the period type.
|
Modifier and Type | Method and Description |
---|---|
protected PeriodType |
BasePeriod.checkPeriodType(PeriodType type)
Validates a period type, converting nulls to a default value and
checking the type is suitable for this instance.
|
Period |
AbstractInterval.toPeriod(PeriodType type)
Converts the duration of the interval to a
Period using the
specified period type. |
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 |
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,
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.
|
Constructor and Description |
---|
BasePeriod(int[] values,
PeriodType type)
Constructor used when we trust ourselves.
|
BasePeriod(int years,
int months,
int weeks,
int days,
int hours,
int minutes,
int seconds,
int millis,
PeriodType type)
Creates a period from a set of field values.
|
BasePeriod(long startInstant,
long endInstant,
PeriodType type,
Chronology chrono)
Creates a period from the given interval endpoints.
|
BasePeriod(long duration,
PeriodType type,
Chronology chrono)
Creates a period from the given millisecond duration, which is only really
suitable for durations less than one day.
|
BasePeriod(Object period,
PeriodType type,
Chronology chrono)
Creates a new period based on another using the
ConverterManager . |
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.
|
BasePeriod(ReadableInstant startInstant,
ReadableInstant endInstant,
PeriodType type)
Creates a period from the given interval endpoints.
|
BasePeriod(ReadablePartial start,
ReadablePartial end,
PeriodType type)
Creates a period from the given duration and end point.
|
Modifier and Type | Method and Description |
---|---|
PeriodType |
AbstractConverter.getPeriodType(Object object)
Selects a suitable period type for the given object.
|
PeriodType |
PeriodConverter.getPeriodType(Object object)
Selects a suitable period type for the given object.
|
Modifier and Type | Method and Description |
---|---|
PeriodType |
PeriodFormatter.getParseType()
Gets the PeriodType that will be used for parsing.
|
Modifier and Type | Method and Description |
---|---|
PeriodFormatter |
PeriodFormatter.withParseType(PeriodType type)
Returns a new formatter with a different PeriodType for parsing.
|
Copyright © 2002–2024 Joda.org. All rights reserved.