Package | Description |
---|---|
javax.time.calendar |
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
|
Modifier and Type | Method and Description |
---|---|
OffsetTime |
LocalTime.atOffset(ZoneOffset offset)
Returns an offset time formed from this time and the specified offset.
|
OffsetTime |
OffsetTime.minus(Duration duration)
Returns a copy of this
OffsetTime with the specified duration subtracted. |
OffsetTime |
OffsetTime.minus(PeriodProvider periodProvider)
Returns a copy of this
OffsetTime with the specified period subtracted. |
OffsetTime |
OffsetTime.minusHours(long hours)
Returns a copy of this
OffsetTime with the specified period in hours subtracted. |
OffsetTime |
OffsetTime.minusMinutes(long minutes)
Returns a copy of this
OffsetTime with the specified period in minutes subtracted. |
OffsetTime |
OffsetTime.minusNanos(long nanos)
Returns a copy of this
OffsetTime with the specified period in nanoseconds subtracted. |
OffsetTime |
OffsetTime.minusSeconds(long seconds)
Returns a copy of this
OffsetTime with the specified period in seconds subtracted. |
static OffsetTime |
OffsetTime.now()
Obtains the current time from the system clock in the default time-zone.
|
static OffsetTime |
OffsetTime.now(Clock clock)
Obtains the current time from the specified clock.
|
static OffsetTime |
OffsetTime.of(int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int nanoOfSecond,
ZoneOffset offset)
Obtains an instance of
OffsetTime from an hour, minute, second and nanosecond. |
static OffsetTime |
OffsetTime.of(int hourOfDay,
int minuteOfHour,
int secondOfMinute,
ZoneOffset offset)
Obtains an instance of
OffsetTime from an hour, minute and second. |
static OffsetTime |
OffsetTime.of(int hourOfDay,
int minuteOfHour,
ZoneOffset offset)
Obtains an instance of
OffsetTime from an hour and minute. |
static OffsetTime |
OffsetTime.of(TimeProvider timeProvider,
ZoneOffset offset)
Obtains an instance of
OffsetTime from a time provider. |
OffsetTime |
Clock.offsetTime()
Gets the current offset time with maximum resolution of up to nanoseconds.
|
OffsetTime |
Clock.offsetTimeToMinute()
Gets the current offset time with a resolution of minutes.
|
OffsetTime |
Clock.offsetTimeToSecond()
Gets the current offset time with a resolution of seconds.
|
static OffsetTime |
OffsetTime.ofInstant(InstantProvider instantProvider,
ZoneOffset offset)
Obtains an instance of
OffsetTime from an InstantProvider . |
static OffsetTime |
OffsetTime.parse(String text)
Obtains an instance of
OffsetTime from a text string such as 10:15:30+01:00 . |
static OffsetTime |
OffsetTime.parse(String text,
DateTimeFormatter formatter)
Obtains an instance of
OffsetTime from a text string using a specific formatter. |
OffsetTime |
OffsetTime.plus(Duration duration)
Returns a copy of this
OffsetTime with the specified duration added. |
OffsetTime |
OffsetTime.plus(PeriodProvider periodProvider)
Returns a copy of this
OffsetTime with the specified period added. |
OffsetTime |
OffsetTime.plusHours(long hours)
Returns a copy of this
OffsetTime with the specified period in hours added. |
OffsetTime |
OffsetTime.plusMinutes(long minutes)
Returns a copy of this
OffsetTime with the specified period in minutes added. |
OffsetTime |
OffsetTime.plusNanos(long nanos)
Returns a copy of this
OffsetTime with the specified period in nanoseconds added. |
OffsetTime |
OffsetTime.plusSeconds(long seconds)
Returns a copy of this
OffsetTime with the specified period in seconds added. |
OffsetTime |
ZonedDateTime.toOffsetTime()
Converts this
ZonedDateTime to a OffsetTime . |
OffsetTime |
OffsetDateTime.toOffsetTime()
Converts this date-time to an
OffsetTime . |
OffsetTime |
OffsetTime.with(TimeAdjuster adjuster)
Returns a copy of this
OffsetTime with the time altered using the adjuster. |
OffsetTime |
OffsetTime.withHourOfDay(int hourOfDay)
Returns a copy of this
OffsetTime with the hour-of-day value altered. |
OffsetTime |
OffsetTime.withMinuteOfHour(int minuteOfHour)
Returns a copy of this
OffsetTime with the minute-of-hour value altered. |
OffsetTime |
OffsetTime.withNanoOfSecond(int nanoOfSecond)
Returns a copy of this
OffsetTime with the nano-of-second value altered. |
OffsetTime |
OffsetTime.withOffsetSameInstant(ZoneOffset offset)
Returns a copy of this
OffsetTime with the specified offset ensuring
that the result is at the same instant on an implied day. |
OffsetTime |
OffsetTime.withOffsetSameLocal(ZoneOffset offset)
Returns a copy of this
OffsetTime with the specified offset ensuring
that the result has the same local time. |
OffsetTime |
OffsetTime.withSecondOfMinute(int secondOfMinute)
Returns a copy of this
OffsetTime with the second-of-minute value altered. |
OffsetTime |
OffsetTime.withTime(TimeProvider timeProvider)
Returns a copy of this
OffsetTime with the time altered and the offset retained. |
Modifier and Type | Method and Description |
---|---|
static CalendricalRule<OffsetTime> |
OffsetTime.rule()
Gets the rule for
OffsetTime . |
Modifier and Type | Method and Description |
---|---|
OffsetDateTime |
LocalDate.atTime(OffsetTime offsetTime)
Returns a local date-time formed from this date at the specified offset time.
|
OffsetDateTime |
OffsetDate.atTime(OffsetTime time)
Returns an offset date-time formed from this date at the specified time.
|
int |
OffsetTime.compareTo(OffsetTime other)
Compares this
OffsetTime to another time based on the UTC equivalent times
then local time. |
boolean |
OffsetTime.equalInstant(OffsetTime other)
Checks if the instant of this
OffsetTime is equal to that of the
specified time applying both times to a common date. |
boolean |
OffsetTime.isAfter(OffsetTime other)
Checks if the instant of this
OffsetTime is after that of the
specified time applying both times to a common date. |
boolean |
OffsetTime.isBefore(OffsetTime other)
Checks if the instant of this
OffsetTime is before that of the
specified time applying both times to a common date. |
static OffsetDateTime |
OffsetDateTime.of(DateProvider dateProvider,
OffsetTime offsetTime)
Obtains an instance of
OffsetDateTime from a DateProvider
and OffsetTime . |
Copyright © 2014. All rights reserved.