Package | Description |
---|---|
java.time |
The main API for dates, times, instants, and durations.
|
java.time.format |
Provides classes to print and parse dates and times.
|
java.time.temporal |
Access to date and time using fields and units, additional value type classes and
base support for calendar systems other than the default ISO.
|
Modifier and Type | Method and Description |
---|---|
int |
Instant.get(TemporalField field)
Gets the value of the specified field from this instant as an
int . |
int |
LocalTime.get(TemporalField field)
Gets the value of the specified field from this time as an
int . |
int |
Month.get(TemporalField field)
Gets the value of the specified field from this month-of-year as an
int . |
int |
ZoneOffset.get(TemporalField field)
Gets the value of the specified field from this offset as an
int . |
int |
DayOfWeek.get(TemporalField field)
Gets the value of the specified field from this day-of-week as an
int . |
int |
LocalDateTime.get(TemporalField field)
Gets the value of the specified field from this date-time as an
int . |
int |
LocalDate.get(TemporalField field)
Gets the value of the specified field from this date as an
int . |
int |
ZonedDateTime.get(TemporalField field)
Gets the value of the specified field from this date-time as an
int . |
long |
Instant.getLong(TemporalField field)
Gets the value of the specified field from this instant as a
long . |
long |
LocalTime.getLong(TemporalField field)
Gets the value of the specified field from this time as a
long . |
long |
Month.getLong(TemporalField field)
Gets the value of the specified field from this month-of-year as a
long . |
long |
ZoneOffset.getLong(TemporalField field)
Gets the value of the specified field from this offset as a
long . |
long |
DayOfWeek.getLong(TemporalField field)
Gets the value of the specified field from this day-of-week as a
long . |
long |
LocalDateTime.getLong(TemporalField field)
Gets the value of the specified field from this date-time as a
long . |
long |
LocalDate.getLong(TemporalField field)
Gets the value of the specified field from this date as a
long . |
long |
ZonedDateTime.getLong(TemporalField field)
Gets the value of the specified field from this date-time as a
long . |
boolean |
Instant.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
LocalTime.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
Month.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
ZoneOffset.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
DayOfWeek.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
LocalDateTime.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
LocalDate.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
ZonedDateTime.isSupported(TemporalField field)
Checks if the specified field is supported.
|
ValueRange |
Instant.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
LocalTime.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
Month.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
ZoneOffset.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
DayOfWeek.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
LocalDateTime.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
LocalDate.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
ZonedDateTime.range(TemporalField field)
Gets the range of valid values for the specified field.
|
Instant |
Instant.with(TemporalField field,
long newValue)
Returns a copy of this instant with the specified field set to a new value.
|
LocalTime |
LocalTime.with(TemporalField field,
long newValue)
Returns a copy of this time with the specified field set to a new value.
|
LocalDateTime |
LocalDateTime.with(TemporalField field,
long newValue)
Returns a copy of this date-time with the specified field set to a new value.
|
LocalDate |
LocalDate.with(TemporalField field,
long newValue)
Returns a copy of this date with the specified field set to a new value.
|
ZonedDateTime |
ZonedDateTime.with(TemporalField field,
long newValue)
Returns a copy of this date-time with the specified field set to a new value.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<TemporalField,java.lang.Long> |
DateTimeBuilder.getFieldValueMap()
Gets the map of field-value pairs in the builder.
|
Modifier and Type | Method and Description |
---|---|
DateTimeBuilder |
DateTimeBuilder.addFieldValue(TemporalField field,
long value)
Adds a field-value pair to the builder.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendFraction(TemporalField field,
int minWidth,
int maxWidth,
boolean decimalPoint)
Appends the fractional value of a date-time field to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field)
Appends the text of a date-time field to the formatter using the full
text style.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field,
java.util.Map<java.lang.Long,java.lang.String> textLookup)
Appends the text of a date-time field to the formatter using the specified
map to supply the text.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendText(TemporalField field,
TextStyle textStyle)
Appends the text of a date-time field to the formatter.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValue(TemporalField field)
Appends the value of a date-time field to the formatter using a normal
output style.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValue(TemporalField field,
int width)
Appends the value of a date-time field to the formatter using a fixed
width, zero-padded approach.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValue(TemporalField field,
int minWidth,
int maxWidth,
SignStyle signStyle)
Appends the value of a date-time field to the formatter providing full
control over printing.
|
DateTimeFormatterBuilder |
DateTimeFormatterBuilder.appendValueReduced(TemporalField field,
int width,
int baseValue)
Appends the reduced value of a date-time field to the formatter.
|
boolean |
DateTimeBuilder.containsFieldValue(TemporalField field)
Checks whether the specified field is present in the builder.
|
long |
DateTimeBuilder.getFieldValue(TemporalField field)
Gets the value of the specified field from the builder.
|
long |
DateTimeBuilder.getLong(TemporalField field) |
long |
DateTimeBuilder.getValidFieldValue(TemporalField field)
Gets the value of the specified field from the builder ensuring it is valid.
|
boolean |
DateTimeBuilder.isSupported(TemporalField field) |
java.lang.Long[] |
DateTimeBuilder.queryFieldValues(TemporalField... fields)
Queries a list of fields from the builder.
|
long |
DateTimeBuilder.removeFieldValue(TemporalField field)
Removes a field-value pair from the builder.
|
void |
DateTimeBuilder.removeFieldValues(TemporalField... fields)
Removes a list of fields from the builder.
|
Constructor and Description |
---|
DateTimeBuilder(TemporalField field,
long value)
Creates a new instance of the builder with a single field-value.
|
Modifier and Type | Class and Description |
---|---|
class |
ChronoField
A standard set of fields.
|
Modifier and Type | Field and Description |
---|---|
static TemporalField |
ISOFields.DAY_OF_QUARTER
The field that represents the day-of-quarter.
|
static TemporalField |
JulianFields.JULIAN_DAY
Julian Day field.
|
static TemporalField |
JulianFields.MODIFIED_JULIAN_DAY
Modified Julian Day field.
|
static TemporalField |
ISOFields.QUARTER_OF_YEAR
The field that represents the quarter-of-year.
|
static TemporalField |
JulianFields.RATA_DIE
Rata Die field.
|
static TemporalField |
ISOFields.WEEK_BASED_YEAR
The field that represents the week-based-year.
|
static TemporalField |
ISOFields.WEEK_OF_WEEK_BASED_YEAR
The field that represents the week-of-week-based-year.
|
Modifier and Type | Method and Description |
---|---|
TemporalField |
WeekFields.dayOfWeek()
Returns a field to access the day of week,
computed based on this WeekFields.
|
TemporalField |
WeekFields.weekOfMonth()
Returns a field to access the week of month,
computed based on this WeekFields.
|
TemporalField |
WeekFields.weekOfYear()
Returns a field to access the week of year,
computed based on this WeekFields.
|
Modifier and Type | Method and Description |
---|---|
int |
ValueRange.checkValidIntValue(long value,
TemporalField field)
Checks that the specified value is valid and fits in an
int . |
long |
ValueRange.checkValidValue(long value,
TemporalField field)
Checks that the specified value is valid.
|
int |
MonthDay.get(TemporalField field)
Gets the value of the specified field from this month-day as an
int . |
default int |
TemporalAccessor.get(TemporalField field)
Gets the value of the specified field as an
int . |
int |
OffsetDate.get(TemporalField field)
Gets the value of the specified field from this date as an
int . |
int |
YearMonth.get(TemporalField field)
Gets the value of the specified field from this year-month as an
int . |
int |
OffsetDateTime.get(TemporalField field)
Gets the value of the specified field from this date-time as an
int . |
default int |
ChronoZonedDateTime.get(TemporalField field) |
int |
OffsetTime.get(TemporalField field)
Gets the value of the specified field from this time as an
int . |
default int |
Era.get(TemporalField field)
Gets the value of the specified field from this era as an
int . |
int |
Year.get(TemporalField field)
Gets the value of the specified field from this year as an
int . |
long |
MonthDay.getLong(TemporalField field)
Gets the value of the specified field from this month-day as a
long . |
long |
TemporalAccessor.getLong(TemporalField field)
Gets the value of the specified field as a
long . |
long |
OffsetDate.getLong(TemporalField field)
Gets the value of the specified field from this date as a
long . |
long |
YearMonth.getLong(TemporalField field)
Gets the value of the specified field from this year-month as a
long . |
long |
OffsetDateTime.getLong(TemporalField field)
Gets the value of the specified field from this date-time as a
long . |
default long |
ChronoZonedDateTime.getLong(TemporalField field) |
long |
OffsetTime.getLong(TemporalField field)
Gets the value of the specified field from this time as a
long . |
default long |
Era.getLong(TemporalField field)
Gets the value of the specified field from this era as a
long . |
long |
Year.getLong(TemporalField field)
Gets the value of the specified field from this year as a
long . |
default boolean |
ChronoLocalDate.isSupported(TemporalField field) |
boolean |
MonthDay.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
TemporalAccessor.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
OffsetDate.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
YearMonth.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
OffsetDateTime.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
OffsetTime.isSupported(TemporalField field)
Checks if the specified field is supported.
|
default boolean |
Era.isSupported(TemporalField field)
Checks if the specified field is supported.
|
boolean |
Year.isSupported(TemporalField field)
Checks if the specified field is supported.
|
ValueRange |
MonthDay.range(TemporalField field)
Gets the range of valid values for the specified field.
|
default ValueRange |
TemporalAccessor.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
OffsetDate.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
YearMonth.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
OffsetDateTime.range(TemporalField field)
Gets the range of valid values for the specified field.
|
default ValueRange |
ChronoZonedDateTime.range(TemporalField field) |
ValueRange |
OffsetTime.range(TemporalField field)
Gets the range of valid values for the specified field.
|
default ValueRange |
Era.range(TemporalField field)
Gets the range of valid values for the specified field.
|
ValueRange |
Year.range(TemporalField field)
Gets the range of valid values for the specified field.
|
Temporal |
Temporal.with(TemporalField field,
long newValue)
Returns an object of the same type as this object with the specified field altered.
|
default ChronoLocalDate<C> |
ChronoLocalDate.with(TemporalField field,
long newValue)
Returns an object of the same type as this object with the specified field altered.
|
OffsetDate |
OffsetDate.with(TemporalField field,
long newValue)
Returns a copy of this date with the specified field set to a new value.
|
YearMonth |
YearMonth.with(TemporalField field,
long newValue)
Returns a copy of this year-month with the specified field set to a new value.
|
OffsetDateTime |
OffsetDateTime.with(TemporalField field,
long newValue)
Returns a copy of this date-time with the specified field set to a new value.
|
ChronoLocalDateTime<C> |
ChronoLocalDateTime.with(TemporalField field,
long newValue)
Returns an object of the same type as this object with the specified field altered.
|
ChronoZonedDateTime<C> |
ChronoZonedDateTime.with(TemporalField field,
long newValue)
Returns an object of the same type as this object with the specified field altered.
|
OffsetTime |
OffsetTime.with(TemporalField field,
long newValue)
Returns a copy of this time with the specified field set to a new value.
|
Year |
Year.with(TemporalField field,
long newValue)
Returns a copy of this year with the specified field set to a new value.
|