| Package | Description |
|---|---|
| java.sql |
Provides the API for accessing and processing data stored in a data source (usually a relational database) using the Java
TM programming language.
|
| java.time |
The main API for dates, times, instants, and durations.
|
| java.time.chrono |
Generic API for calendar systems other than the default ISO.
|
| java.time.temporal |
Access to date and time using fields and units, and date time adjusters.
|
| java.time.zone |
Support for time-zones and their rules.
|
| Modifier and Type | Method and Description |
|---|---|
LocalTime |
Time.toLocalTime()
Converts this
Time object to a
LocalTime.
|
| Modifier and Type | Method and Description |
|---|---|
static Time |
Time.valueOf(LocalTime
Obtains an instance of
Time from a
LocalTime object with the same hour, minute and second time value as the given
LocalTime.
|
| Modifier and Type | Field and Description |
|---|---|
static LocalTime |
LocalTime.MAX
The maximum supported
LocalTime, '23:59:59.999999999'.
|
static LocalTime |
LocalTime.MIDNIGHT
The time of midnight at the start of the day, '00:00'.
|
static LocalTime |
LocalTime.MIN
The minimum supported
LocalTime, '00:00'.
|
static LocalTime |
LocalTime.NOON
The time of noon in the middle of the day, '12:00'.
|
| Modifier and Type | Method and Description |
|---|---|
static LocalTime |
LocalTime.from(TemporalAccessor
Obtains an instance of
LocalTime from a temporal object.
|
LocalTime |
LocalTime.minus(long amountToSubtract, TemporalUnit
Returns a copy of this time with the specified amount subtracted.
|
LocalTime |
LocalTime.minus(TemporalAmount
Returns a copy of this time with the specified amount subtracted.
|
LocalTime |
LocalTime.minusHours(long hoursToSubtract)
Returns a copy of this
LocalTime with the specified period in hours subtracted.
|
LocalTime |
LocalTime.minusMinutes(long minutesToSubtract)
Returns a copy of this
LocalTime with the specified period in minutes subtracted.
|
LocalTime |
LocalTime.minusNanos(long nanosToSubtract)
Returns a copy of this
LocalTime with the specified period in nanoseconds subtracted.
|
LocalTime |
LocalTime.minusSeconds(long secondsToSubtract)
Returns a copy of this
LocalTime with the specified period in seconds subtracted.
|
static LocalTime |
LocalTime.now()
Obtains the current time from the system clock in the default time-zone.
|
static LocalTime |
LocalTime.now(Clock
Obtains the current time from the specified clock.
|
static LocalTime |
LocalTime.now(ZoneId
Obtains the current time from the system clock in the specified time-zone.
|
static LocalTime |
LocalTime.of(int hour, int minute)
Obtains an instance of
LocalTime from an hour and minute.
|
static LocalTime |
LocalTime.of(int hour, int minute, int second)
Obtains an instance of
LocalTime from an hour, minute and second.
|
static LocalTime |
LocalTime.of(int hour, int minute, int second, int nanoOfSecond)
Obtains an instance of
LocalTime from an hour, minute, second and nanosecond.
|
static LocalTime |
LocalTime.ofNanoOfDay(long nanoOfDay)
Obtains an instance of
LocalTime from a nanos-of-day value.
|
static LocalTime |
LocalTime.ofSecondOfDay(long secondOfDay)
Obtains an instance of
LocalTime from a second-of-day value.
|
static LocalTime |
LocalTime.parse(CharSequence
Obtains an instance of
LocalTime from a text string such as
10:15.
|
static LocalTime |
LocalTime.parse(CharSequence
Obtains an instance of
LocalTime from a text string using a specific formatter.
|
LocalTime |
LocalTime.plus(long amountToAdd, TemporalUnit
Returns a copy of this time with the specified amount added.
|
LocalTime |
LocalTime.plus(TemporalAmount
Returns a copy of this time with the specified amount added.
|
LocalTime |
LocalTime.plusHours(long hoursToAdd)
Returns a copy of this
LocalTime with the specified period in hours added.
|
LocalTime |
LocalTime.plusMinutes(long minutesToAdd)
Returns a copy of this
LocalTime with the specified period in minutes added.
|
LocalTime |
LocalTime.plusNanos(long nanosToAdd)
Returns a copy of this
LocalTime with the specified period in nanoseconds added.
|
LocalTime |
LocalTime.plusSeconds(long secondstoAdd)
Returns a copy of this
LocalTime with the specified period in seconds added.
|
LocalTime |
OffsetTime.toLocalTime()
Gets the
LocalTime part of this date-time.
|
LocalTime |
ZonedDateTime.toLocalTime()
Gets the
LocalTime part of this date-time.
|
LocalTime |
OffsetDateTime.toLocalTime()
Gets the
LocalTime part of this date-time.
|
LocalTime |
LocalDateTime.toLocalTime()
Gets the
LocalTime part of this date-time.
|
LocalTime |
LocalTime.truncatedTo(TemporalUnit
Returns a copy of this
LocalTime with the time truncated.
|
LocalTime |
LocalTime.with(TemporalAdjuster
Returns an adjusted copy of this time.
|
LocalTime |
LocalTime.with(TemporalField
Returns a copy of this time with the specified field set to a new value.
|
LocalTime |
LocalTime.withHour(int hour)
Returns a copy of this
LocalTime with the hour-of-day value altered.
|
LocalTime |
LocalTime.withMinute(int minute)
Returns a copy of this
LocalTime with the minute-of-hour value altered.
|
LocalTime |
LocalTime.withNano(int nanoOfSecond)
Returns a copy of this
LocalTime with the nano-of-second value altered.
|
LocalTime |
LocalTime.withSecond(int second)
Returns a copy of this
LocalTime with the second-of-minute value altered.
|
| Modifier and Type | Method and Description |
|---|---|
LocalDateTime |
LocalDate.atTime(LocalTime
Combines this date with a time to create a
LocalDateTime.
|
int |
LocalTime.compareTo(LocalTime
Compares this
LocalTime to another time.
|
boolean |
LocalTime.isAfter(LocalTime
Checks if this
LocalTime is after the specified time.
|
boolean |
LocalTime.isBefore(LocalTime
Checks if this
LocalTime is before the specified time.
|
static LocalDateTime |
LocalDateTime.of(LocalDate
Obtains an instance of
LocalDateTime from a date and time.
|
static ZonedDateTime |
ZonedDateTime.of(LocalDate
Obtains an instance of
ZonedDateTime from a local date and time.
|
static OffsetDateTime |
OffsetDateTime.of(LocalDate
Obtains an instance of
OffsetDateTime from a date, time and offset.
|
static OffsetTime |
OffsetTime.of(LocalTime
Obtains an instance of
OffsetTime from a local time and an offset.
|
| Modifier and Type | Method and Description |
|---|---|
LocalTime |
ChronoLocalDateTime.toLocalTime()
Gets the local time part of this date-time.
|
default LocalTime |
ChronoZonedDateTime.toLocalTime()
Gets the local time part of this date-time.
|
| Modifier and Type | Method and Description |
|---|---|
ChronoLocalDateTime |
JapaneseDate.atTime(LocalTime
|
default ChronoLocalDateTime |
ChronoLocalDate.atTime(LocalTime
Combines this date with a time to create a
ChronoLocalDateTime.
|
ChronoLocalDateTime |
HijrahDate.atTime(LocalTime
|
ChronoLocalDateTime |
ThaiBuddhistDate.atTime(LocalTime
|
ChronoLocalDateTime |
MinguoDate.atTime(LocalTime
|
| Modifier and Type | Method and Description |
|---|---|
static TemporalQuery |
TemporalQueries.localTime()
A query for
LocalTime returning null if not found.
|
| Modifier and Type | Method and Description |
|---|---|
LocalTime |
ZoneOffsetTransitionRule.getLocalTime()
Gets the local time of day of the transition which must be checked with
ZoneOffsetTransitionRule.
|
| Modifier and Type | Method and Description |
|---|---|
static ZoneOffsetTransitionRule |
ZoneOffsetTransitionRule.of(Month
Obtains an instance defining the yearly rule to create transitions between two offsets.
|