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.field |
Implementation package providing abstract and standard field classes.
|
org.joda.time.format |
Provides printing and parsing support for instants and durations.
|
Modifier and Type | Method and Description |
---|---|
static DateTimeFieldType |
DateTimeFieldType.centuryOfEra()
Get the century of era field type.
|
static DateTimeFieldType |
DateTimeFieldType.clockhourOfDay()
Get the hour of day (offset to 1-24) field type.
|
static DateTimeFieldType |
DateTimeFieldType.clockhourOfHalfday()
Get the hour of am/pm (offset to 1-12) field type.
|
static DateTimeFieldType |
DateTimeFieldType.dayOfMonth()
Get the day of month field type.
|
static DateTimeFieldType |
DateTimeFieldType.dayOfWeek()
Get the day of week field type.
|
static DateTimeFieldType |
DateTimeFieldType.dayOfYear()
Get the day of year field type.
|
static DateTimeFieldType |
DateTimeFieldType.era()
Get the era field type.
|
DateTimeFieldType |
IllegalFieldValueException.getDateTimeFieldType()
Returns the DateTimeFieldType whose value was invalid, or null if not applicable.
|
DateTimeFieldType |
Partial.getFieldType(int index)
Gets the field type at the specified index.
|
DateTimeFieldType |
YearMonth.getFieldType(int index)
Gets the field type at the specified index.
|
DateTimeFieldType |
TimeOfDay.getFieldType(int index)
Deprecated.
Gets the field type at the specified index.
|
DateTimeFieldType |
ReadablePartial.getFieldType(int index)
Gets the field type at the specified index.
|
DateTimeFieldType |
MonthDay.getFieldType(int index)
Gets the field type at the specified index.
|
DateTimeFieldType |
YearMonthDay.getFieldType(int index)
Deprecated.
Gets the field type at the specified index.
|
DateTimeFieldType[] |
Partial.getFieldTypes()
Gets an array of the field type of each of the fields that
this partial supports.
|
DateTimeFieldType[] |
YearMonth.getFieldTypes()
Gets an array of the field type of each of the fields that this partial supports.
|
DateTimeFieldType[] |
TimeOfDay.getFieldTypes()
Deprecated.
Gets an array of the field type of each of the fields that this partial supports.
|
DateTimeFieldType[] |
MonthDay.getFieldTypes()
Gets an array of the field type of each of the fields that this partial supports.
|
DateTimeFieldType[] |
YearMonthDay.getFieldTypes()
Deprecated.
Gets an array of the field type of each of the fields that this partial supports.
|
DateTimeFieldType |
DateTimeComparator.getLowerLimit()
Gets the field type that represents the lower limit of comparison.
|
abstract DateTimeFieldType |
DateTimeField.getType()
Get the type of the field.
|
DateTimeFieldType |
DateTimeComparator.getUpperLimit()
Gets the field type that represents the upper limit of comparison.
|
static DateTimeFieldType |
DateTimeFieldType.halfdayOfDay()
Get the AM(0) PM(1) field type.
|
static DateTimeFieldType |
DateTimeFieldType.hourOfDay()
Get the hour of day (0-23) field type.
|
static DateTimeFieldType |
DateTimeFieldType.hourOfHalfday()
Get the hour of am/pm (0-11) field type.
|
static DateTimeFieldType |
DateTimeFieldType.millisOfDay()
Get the millis of day field type.
|
static DateTimeFieldType |
DateTimeFieldType.millisOfSecond()
Get the millis of second field type.
|
static DateTimeFieldType |
DateTimeFieldType.minuteOfDay()
Get the minute of day field type.
|
static DateTimeFieldType |
DateTimeFieldType.minuteOfHour()
Get the minute of hour field type.
|
static DateTimeFieldType |
DateTimeFieldType.monthOfYear()
Get the month of year field type.
|
static DateTimeFieldType |
DateTimeFieldType.secondOfDay()
Get the second of day field type.
|
static DateTimeFieldType |
DateTimeFieldType.secondOfMinute()
Get the second of minute field type.
|
static DateTimeFieldType |
DateTimeFieldType.weekOfWeekyear()
Get the week of a week based year field type.
|
static DateTimeFieldType |
DateTimeFieldType.weekyear()
Get the year of a week based year field type.
|
static DateTimeFieldType |
DateTimeFieldType.weekyearOfCentury()
Get the year of a week based year within a century field type.
|
static DateTimeFieldType |
DateTimeFieldType.year()
Get the year field type.
|
static DateTimeFieldType |
DateTimeFieldType.yearOfCentury()
Get the year of century field type.
|
static DateTimeFieldType |
DateTimeFieldType.yearOfEra()
Get the year of era field type.
|
Modifier and Type | Method and Description |
---|---|
int |
LocalDateTime.get(DateTimeFieldType type)
Get the value of one of the fields of a datetime.
|
int |
LocalDate.get(DateTimeFieldType fieldType)
Get the value of one of the fields of a datetime.
|
int |
ReadablePartial.get(DateTimeFieldType field)
Gets the value of one of the fields.
|
int |
ReadableInstant.get(DateTimeFieldType type)
Get the value of one of the fields of a datetime.
|
int |
LocalTime.get(DateTimeFieldType fieldType)
Get the value of one of the fields of time.
|
static DateTimeComparator |
DateTimeComparator.getInstance(DateTimeFieldType lowerLimit)
Returns a DateTimeComparator with a lower limit only.
|
static DateTimeComparator |
DateTimeComparator.getInstance(DateTimeFieldType lowerLimit,
DateTimeFieldType upperLimit)
Returns a DateTimeComparator with a lower and upper limit.
|
boolean |
LocalDateTime.isSupported(DateTimeFieldType type)
Checks if the field type specified is supported by this
local datetime and chronology.
|
boolean |
LocalDate.isSupported(DateTimeFieldType type)
Checks if the field type specified is supported by this
local date and chronology.
|
boolean |
ReadablePartial.isSupported(DateTimeFieldType field)
Checks whether the field type specified is supported by this partial.
|
boolean |
ReadableInstant.isSupported(DateTimeFieldType field)
Checks whether the field type specified is supported by this implementation.
|
boolean |
LocalTime.isSupported(DateTimeFieldType type)
Checks if the field type specified is supported by this
local time and chronology.
|
Partial.Property |
Partial.property(DateTimeFieldType type)
Gets the property object for the specified type, which contains
many useful methods for getting and manipulating the partial.
|
LocalDateTime.Property |
LocalDateTime.property(DateTimeFieldType fieldType)
Gets the property object for the specified type, which contains many
useful methods.
|
YearMonth.Property |
YearMonth.property(DateTimeFieldType type)
Gets the property object for the specified type, which contains
many useful methods.
|
TimeOfDay.Property |
TimeOfDay.property(DateTimeFieldType type)
Deprecated.
Gets the property object for the specified type, which contains
many useful methods.
|
LocalDate.Property |
LocalDate.property(DateTimeFieldType fieldType)
Gets the property object for the specified type, which contains many
useful methods.
|
DateTime.Property |
DateTime.property(DateTimeFieldType type)
Gets the property object for the specified type, which contains many useful methods.
|
MutableDateTime.Property |
MutableDateTime.property(DateTimeFieldType type)
Gets the property object for the specified type, which contains many useful methods.
|
MonthDay.Property |
MonthDay.property(DateTimeFieldType type)
Gets the property object for the specified type, which contains
many useful methods.
|
YearMonthDay.Property |
YearMonthDay.property(DateTimeFieldType type)
Deprecated.
Gets the property object for the specified type, which contains
many useful methods.
|
DateMidnight.Property |
DateMidnight.property(DateTimeFieldType type)
Deprecated.
Gets the property object for the specified type, which contains many useful methods.
|
LocalTime.Property |
LocalTime.property(DateTimeFieldType fieldType)
Gets the property object for the specified type, which contains
many useful methods.
|
void |
ReadWritableInstant.set(DateTimeFieldType type,
int value)
Sets the value of one of the fields of the instant, such as hourOfDay.
|
void |
MutableDateTime.set(DateTimeFieldType type,
int value)
Sets the value of one of the fields of the instant, such as hourOfDay.
|
Partial |
Partial.with(DateTimeFieldType fieldType,
int value)
Gets a copy of this date with the specified field set to a new value.
|
Partial |
Partial.withField(DateTimeFieldType fieldType,
int value)
Gets a copy of this Partial with the specified field set to a new value.
|
LocalDateTime |
LocalDateTime.withField(DateTimeFieldType fieldType,
int value)
Returns a copy of this datetime with the specified field set to a new value.
|
YearMonth |
YearMonth.withField(DateTimeFieldType fieldType,
int value)
Returns a copy of this year-month with the specified field set to a new value.
|
TimeOfDay |
TimeOfDay.withField(DateTimeFieldType fieldType,
int value)
Deprecated.
Returns a copy of this time with the specified field set to a new value.
|
LocalDate |
LocalDate.withField(DateTimeFieldType fieldType,
int value)
Returns a copy of this date with the specified field set to a new value.
|
DateTime |
DateTime.withField(DateTimeFieldType fieldType,
int value)
Returns a copy of this datetime with the specified field set to a new value.
|
MonthDay |
MonthDay.withField(DateTimeFieldType fieldType,
int value)
Returns a copy of this month-day with the specified field set to a new value.
|
YearMonthDay |
YearMonthDay.withField(DateTimeFieldType fieldType,
int value)
Deprecated.
Returns a copy of this date with the specified field set to a new value.
|
DateMidnight |
DateMidnight.withField(DateTimeFieldType fieldType,
int value)
Deprecated.
Returns a copy of this date with the specified field set to a new value.
|
LocalTime |
LocalTime.withField(DateTimeFieldType fieldType,
int value)
Returns a copy of this time with the specified field set
to a new value.
|
Partial |
Partial.without(DateTimeFieldType fieldType)
Gets a copy of this date with the specified field removed.
|
Constructor and Description |
---|
DateTimeComparator(DateTimeFieldType lowerLimit,
DateTimeFieldType upperLimit)
Restricted constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType,
Number value,
Number lowerBound,
Number upperBound)
Constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType,
Number value,
Number lowerBound,
Number upperBound,
String explain)
Constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType,
Number value,
String explain)
Constructor.
|
IllegalFieldValueException(DateTimeFieldType fieldType,
String value)
Constructor.
|
Partial(DateTimeFieldType[] types,
int[] values)
Constructs a Partial with the specified fields and values.
|
Partial(DateTimeFieldType[] types,
int[] values,
Chronology chronology)
Constructs a Partial with the specified fields and values.
|
Partial(DateTimeFieldType type,
int value)
Constructs a Partial with the specified field and value.
|
Partial(DateTimeFieldType type,
int value,
Chronology chronology)
Constructs a Partial with the specified field and value.
|
Modifier and Type | Method and Description |
---|---|
DateTimeFieldType |
AbstractPartial.getFieldType(int index)
Gets the field type at the specified index.
|
DateTimeFieldType[] |
AbstractPartial.getFieldTypes()
Gets an array of the field types that this partial supports.
|
Modifier and Type | Method and Description |
---|---|
int |
AbstractInstant.get(DateTimeFieldType type)
Get the value of one of the fields of a datetime using the chronology of the instant.
|
int |
AbstractPartial.get(DateTimeFieldType type)
Get the value of one of the fields of a datetime.
|
int |
AbstractDateTime.get(DateTimeFieldType type)
Get the value of one of the fields of a datetime.
|
int |
AbstractPartial.indexOf(DateTimeFieldType type)
Gets the index of the specified field, or -1 if the field is unsupported.
|
protected int |
AbstractPartial.indexOfSupported(DateTimeFieldType type)
Gets the index of the specified field, throwing an exception if the
field is unsupported.
|
boolean |
AbstractInstant.isSupported(DateTimeFieldType type)
Checks if the field type specified is supported by this instant and chronology.
|
boolean |
AbstractPartial.isSupported(DateTimeFieldType type)
Checks whether the field specified is supported by this partial.
|
Modifier and Type | Method and Description |
---|---|
DateTimeFieldType |
AbstractReadableInstantFieldProperty.getFieldType()
Gets the field type being used.
|
DateTimeFieldType |
AbstractPartialFieldProperty.getFieldType()
Gets the field type being used.
|
DateTimeFieldType |
BaseDateTimeField.getType() |
DateTimeFieldType |
DelegatedDateTimeField.getType() |
DateTimeFieldType |
UnsupportedDateTimeField.getType() |
Modifier and Type | Method and Description |
---|---|
static UnsupportedDateTimeField |
UnsupportedDateTimeField.getInstance(DateTimeFieldType type,
DurationField durationField)
Gets an instance of UnsupportedDateTimeField for a specific named field.
|
static void |
FieldUtils.verifyValueBounds(DateTimeFieldType fieldType,
int value,
int lowerBound,
int upperBound)
Verify that input values are within specified bounds.
|
Constructor and Description |
---|
BaseDateTimeField(DateTimeFieldType type)
Constructor.
|
DecoratedDateTimeField(DateTimeField field,
DateTimeFieldType type)
Constructor.
|
DelegatedDateTimeField(DateTimeField field,
DateTimeFieldType type)
Constructor.
|
DelegatedDateTimeField(DateTimeField field,
DurationField rangeField,
DateTimeFieldType type)
Constructor.
|
DividedDateTimeField(DateTimeField field,
DateTimeFieldType type,
int divisor)
Constructor.
|
DividedDateTimeField(DateTimeField field,
DurationField rangeField,
DateTimeFieldType type,
int divisor)
Constructor.
|
DividedDateTimeField(RemainderDateTimeField remainderField,
DateTimeFieldType type)
Construct a DividedDateTimeField that compliments the given
RemainderDateTimeField.
|
DividedDateTimeField(RemainderDateTimeField remainderField,
DurationField rangeField,
DateTimeFieldType type)
Construct a DividedDateTimeField that compliments the given
RemainderDateTimeField.
|
ImpreciseDateTimeField(DateTimeFieldType type,
long unitMillis)
Constructor.
|
OffsetDateTimeField(DateTimeField field,
DateTimeFieldType type,
int offset)
Constructor.
|
OffsetDateTimeField(DateTimeField field,
DateTimeFieldType type,
int offset,
int minValue,
int maxValue)
Constructor.
|
PreciseDateTimeField(DateTimeFieldType type,
DurationField unit,
DurationField range)
Constructor.
|
PreciseDurationDateTimeField(DateTimeFieldType type,
DurationField unit)
Constructor.
|
RemainderDateTimeField(DateTimeField field,
DateTimeFieldType type,
int divisor)
Constructor.
|
RemainderDateTimeField(DateTimeField field,
DurationField rangeField,
DateTimeFieldType type,
int divisor)
Constructor.
|
RemainderDateTimeField(DividedDateTimeField dividedField,
DateTimeFieldType type)
Construct a RemainderDateTimeField that compliments the given
DividedDateTimeField.
|
RemainderDateTimeField(DividedDateTimeField dividedField,
DurationField durationField,
DateTimeFieldType type)
Construct a RemainderDateTimeField that compliments the given
DividedDateTimeField.
|
ZeroIsMaxDateTimeField(DateTimeField field,
DateTimeFieldType type)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendDecimal(DateTimeFieldType fieldType,
int minDigits,
int maxDigits)
Instructs the printer to emit a field value as a decimal number, and the
parser to expect an unsigned decimal number.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendFixedDecimal(DateTimeFieldType fieldType,
int numDigits)
Instructs the printer to emit a field value as a fixed-width decimal
number (smaller numbers will be left-padded with zeros), and the parser
to expect an unsigned decimal number with the same fixed width.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendFixedSignedDecimal(DateTimeFieldType fieldType,
int numDigits)
Instructs the printer to emit a field value as a fixed-width decimal
number (smaller numbers will be left-padded with zeros), and the parser
to expect an signed decimal number with the same fixed width.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendFraction(DateTimeFieldType fieldType,
int minDigits,
int maxDigits)
Instructs the printer to emit a remainder of time as a decimal fraction,
without decimal point.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendShortText(DateTimeFieldType fieldType)
Instructs the printer to emit a field value as short text, and the
parser to expect text.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendSignedDecimal(DateTimeFieldType fieldType,
int minDigits,
int maxDigits)
Instructs the printer to emit a field value as a decimal number, and the
parser to expect a signed decimal number.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(DateTimeFieldType fieldType)
Instructs the printer to emit a field value as text, and the
parser to expect text.
|
void |
DateTimeParserBucket.saveField(DateTimeFieldType fieldType,
int value)
Saves a datetime field value.
|
void |
DateTimeParserBucket.saveField(DateTimeFieldType fieldType,
String text,
Locale locale)
Saves a datetime field text value.
|
Modifier and Type | Method and Description |
---|---|
static DateTimeFormatter |
ISODateTimeFormat.forFields(Collection<DateTimeFieldType> fields,
boolean extended,
boolean strictISO)
Returns a formatter that outputs only those fields specified.
|
Copyright © 2002–2025 Joda.org. All rights reserved.