Package | Description |
---|---|
javax.time.calendar |
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
|
javax.time.calendar.zone |
Provides classes to implement time-zones and their rules.
|
Modifier and Type | Method and Description |
---|---|
OffsetDateTime |
OffsetDate.atMidnight()
Returns an offset date-time formed from this date at the time of midnight.
|
OffsetDateTime |
LocalDateTime.atOffset(ZoneOffset offset)
Returns an offset date-time formed from this date-time and the specified offset.
|
OffsetDateTime |
OffsetDate.atTime(int hourOfDay,
int minuteOfHour)
Returns an offset date-time formed from this date at the specified time.
|
OffsetDateTime |
OffsetDate.atTime(int hourOfDay,
int minuteOfHour,
int secondOfMinute)
Returns an offset date-time formed from this date at the specified time.
|
OffsetDateTime |
OffsetDate.atTime(int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int nanoOfSecond)
Returns an offset date-time formed from this date at the specified time.
|
OffsetDateTime |
OffsetDate.atTime(LocalTime time)
Returns an offset date-time formed from this date at the specified time.
|
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.
|
protected abstract OffsetDateTime |
ZoneResolver.handleGap(TimeZone zone,
ZoneRules rules,
ZoneOffsetTransition gapInfo,
LocalDateTime newDateTime,
OffsetDateTime oldDateTime)
Defines the strategy for selecting an offset to use for a local date-time
when the local date-time is in a local time-line gap.
|
protected abstract OffsetDateTime |
ZoneResolver.handleOverlap(TimeZone zone,
ZoneRules rules,
ZoneOffsetTransition overlapInfo,
LocalDateTime newDateTime,
OffsetDateTime oldDateTime)
Defines the strategy for selecting an offset to use for a local date-time
when the local date-time is in a local time-line overlap.
|
OffsetDateTime |
OffsetDateTime.minus(Duration duration)
Returns a copy of this
OffsetDateTime with the specified duration subtracted. |
OffsetDateTime |
OffsetDateTime.minus(PeriodProvider periodProvider)
Returns a copy of this
OffsetDateTime with the specified period subtracted. |
OffsetDateTime |
OffsetDateTime.minusDays(long days)
Returns a copy of this
OffsetDateTime with the specified period in days subtracted. |
OffsetDateTime |
OffsetDateTime.minusHours(long hours)
Returns a copy of this
OffsetDateTime with the specified period in hours subtracted. |
OffsetDateTime |
OffsetDateTime.minusMinutes(long minutes)
Returns a copy of this
OffsetDateTime with the specified period in minutes subtracted. |
OffsetDateTime |
OffsetDateTime.minusMonths(long months)
Returns a copy of this
OffsetDateTime with the specified period in months subtracted. |
OffsetDateTime |
OffsetDateTime.minusMonths(long months,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the specified period in months subtracted. |
OffsetDateTime |
OffsetDateTime.minusNanos(long nanos)
Returns a copy of this
OffsetDateTime with the specified period in nanoseconds subtracted. |
OffsetDateTime |
OffsetDateTime.minusSeconds(long seconds)
Returns a copy of this
OffsetDateTime with the specified period in seconds subtracted. |
OffsetDateTime |
OffsetDateTime.minusWeeks(long weeks)
Returns a copy of this
OffsetDateTime with the specified period in weeks subtracted. |
OffsetDateTime |
OffsetDateTime.minusYears(long years)
Returns a copy of this
OffsetDateTime with the specified period in years subtracted. |
OffsetDateTime |
OffsetDateTime.minusYears(long years,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the specified period in years subtracted. |
static OffsetDateTime |
OffsetDateTime.now()
Obtains the current date-time from the system clock in the default time-zone.
|
static OffsetDateTime |
OffsetDateTime.now(Clock clock)
Obtains the current date-time from the specified clock.
|
static OffsetDateTime |
OffsetDateTime.of(DateProvider dateProvider,
OffsetTime offsetTime)
Obtains an instance of
OffsetDateTime from a DateProvider
and OffsetTime . |
static OffsetDateTime |
OffsetDateTime.of(DateProvider dateProvider,
TimeProvider timeProvider,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from a date, time and zone offset. |
static OffsetDateTime |
OffsetDateTime.of(DateTimeProvider dateTimeProvider,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from a date-time provider. |
static OffsetDateTime |
OffsetDateTime.of(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int nanoOfSecond,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month,
day, hour, minute, second and nanosecond. |
static OffsetDateTime |
OffsetDateTime.of(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month,
day, hour, minute and second, setting the nanosecond to zero. |
static OffsetDateTime |
OffsetDateTime.of(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month,
day, hour and minute, setting the second and nanosecond to zero. |
static OffsetDateTime |
OffsetDateTime.of(int year,
MonthOfYear monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int nanoOfSecond,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month,
day, hour, minute, second and nanosecond. |
static OffsetDateTime |
OffsetDateTime.of(int year,
MonthOfYear monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month,
day, hour, minute and second, setting the nanosecond to zero. |
static OffsetDateTime |
OffsetDateTime.of(int year,
MonthOfYear monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month,
day, hour and minute, setting the second and nanosecond to zero. |
static OffsetDateTime |
OffsetDateTime.ofEpochSeconds(long epochSeconds,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime using seconds from the
epoch of 1970-01-01T00:00:00Z. |
OffsetDateTime |
Clock.offsetDateTime()
Gets the current offset date-time with maximum resolution of up to nanoseconds.
|
OffsetDateTime |
Clock.offsetDateTimeToMinute()
Gets the current offset date-time with a resolution of minutes.
|
OffsetDateTime |
Clock.offsetDateTimeToSecond()
Gets the current offset date-time with a resolution of seconds.
|
static OffsetDateTime |
OffsetDateTime.ofInstant(InstantProvider instantProvider,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from an InstantProvider . |
static OffsetDateTime |
OffsetDateTime.ofMidnight(DateProvider dateProvider,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from a date with the
time set to midnight at the start of day. |
static OffsetDateTime |
OffsetDateTime.ofMidnight(int year,
int monthOfYear,
int dayOfMonth,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month and
day with the time set to midnight at the start of day. |
static OffsetDateTime |
OffsetDateTime.ofMidnight(int year,
MonthOfYear monthOfYear,
int dayOfMonth,
ZoneOffset offset)
Obtains an instance of
OffsetDateTime from year, month and
day with the time set to midnight at the start of day. |
static OffsetDateTime |
OffsetDateTime.parse(String text)
Obtains an instance of
OffsetDateTime from a text string such as 2007-12-03T10:15:30+01:00 . |
static OffsetDateTime |
OffsetDateTime.parse(String text,
DateTimeFormatter formatter)
Obtains an instance of
OffsetDateTime from a text string using a specific formatter. |
OffsetDateTime |
OffsetDateTime.plus(Duration duration)
Returns a copy of this
OffsetDateTime with the specified duration added. |
OffsetDateTime |
OffsetDateTime.plus(PeriodProvider periodProvider)
Returns a copy of this
OffsetDateTime with the specified period added. |
OffsetDateTime |
OffsetDateTime.plusDays(long days)
Returns a copy of this OffsetDateTime with the specified period in days added.
|
OffsetDateTime |
OffsetDateTime.plusHours(long hours)
Returns a copy of this
OffsetDateTime with the specified period in hours added. |
OffsetDateTime |
OffsetDateTime.plusMinutes(long minutes)
Returns a copy of this
OffsetDateTime with the specified period in minutes added. |
OffsetDateTime |
OffsetDateTime.plusMonths(long months)
Returns a copy of this
OffsetDateTime with the specified period in months added. |
OffsetDateTime |
OffsetDateTime.plusMonths(long months,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the specified period in months added. |
OffsetDateTime |
OffsetDateTime.plusNanos(long nanos)
Returns a copy of this
OffsetDateTime with the specified period in nanoseconds added. |
OffsetDateTime |
OffsetDateTime.plusSeconds(long seconds)
Returns a copy of this
OffsetDateTime with the specified period in seconds added. |
OffsetDateTime |
OffsetDateTime.plusWeeks(long weeks)
Returns a copy of this OffsetDateTime with the specified period in weeks added.
|
OffsetDateTime |
OffsetDateTime.plusYears(long years)
Returns a copy of this
OffsetDateTime with the specified period in years added. |
OffsetDateTime |
OffsetDateTime.plusYears(long years,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the specified period in years added. |
OffsetDateTime |
ZoneResolver.resolve(TimeZone zone,
LocalDateTime newDateTime,
ZonedDateTime oldDateTime)
Resolves the new local date-time to an offset date-time using the zone.
|
OffsetDateTime |
ZonedDateTime.toOffsetDateTime()
Converts this
ZonedDateTime to a OffsetDateTime . |
OffsetDateTime |
OffsetDateTime.with(DateAdjuster adjuster)
Returns a copy of this OffsetDateTime with the date altered using the adjuster.
|
OffsetDateTime |
OffsetDateTime.with(MonthOfYear monthOfYear)
Returns a copy of this
OffsetDateTime with the month-of-year altered. |
OffsetDateTime |
OffsetDateTime.with(MonthOfYear monthOfYear,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the month-of-year altered. |
OffsetDateTime |
OffsetDateTime.with(TimeAdjuster adjuster)
Returns a copy of this OffsetDateTime with the time altered using the adjuster.
|
OffsetDateTime |
OffsetDateTime.withDate(int year,
int monthOfYear,
int dayOfMonth)
Returns a copy of this
OffsetDateTime with the date values altered. |
OffsetDateTime |
OffsetDateTime.withDate(int year,
MonthOfYear monthOfYear,
int dayOfMonth)
Returns a copy of this
OffsetDateTime with the date values altered. |
OffsetDateTime |
OffsetDateTime.withDateTime(DateTimeProvider dateTimeProvider)
Returns a copy of this
OffsetDateTime with the time altered and the offset retained. |
OffsetDateTime |
OffsetDateTime.withDayOfMonth(int dayOfMonth)
Returns a copy of this
OffsetDateTime with the day-of-month altered. |
OffsetDateTime |
OffsetDateTime.withDayOfMonth(int dayOfMonth,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the day-of-month altered. |
OffsetDateTime |
OffsetDateTime.withDayOfYear(int dayOfYear)
Returns a copy of this
OffsetDateTime with the day-of-year altered. |
OffsetDateTime |
OffsetDateTime.withHourOfDay(int hourOfDay)
Returns a copy of this
OffsetDateTime with the hour-of-day value altered. |
OffsetDateTime |
OffsetDateTime.withMinuteOfHour(int minuteOfHour)
Returns a copy of this
OffsetDateTime with the minute-of-hour value altered. |
OffsetDateTime |
OffsetDateTime.withMonthOfYear(int monthOfYear)
Returns a copy of this
OffsetDateTime with the month-of-year altered. |
OffsetDateTime |
OffsetDateTime.withMonthOfYear(int monthOfYear,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the month-of-year altered. |
OffsetDateTime |
OffsetDateTime.withNanoOfSecond(int nanoOfSecond)
Returns a copy of this
OffsetDateTime with the nano-of-second value altered. |
OffsetDateTime |
OffsetDateTime.withOffsetSameInstant(ZoneOffset offset)
Returns a copy of this
OffsetDateTime with the specified offset ensuring
that the result is at the same instant. |
OffsetDateTime |
OffsetDateTime.withOffsetSameLocal(ZoneOffset offset)
Returns a copy of this
OffsetDateTime with the specified offset ensuring
that the result has the same local date-time. |
OffsetDateTime |
OffsetDateTime.withSecondOfMinute(int secondOfMinute)
Returns a copy of this
OffsetDateTime with the second-of-minute value altered. |
OffsetDateTime |
OffsetDateTime.withTime(int hourOfDay,
int minuteOfHour)
Returns a copy of this
OffsetDateTime with the time values altered. |
OffsetDateTime |
OffsetDateTime.withTime(int hourOfDay,
int minuteOfHour,
int secondOfMinute)
Returns a copy of this
OffsetDateTime with the time values altered. |
OffsetDateTime |
OffsetDateTime.withTime(int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int nanoOfSecond)
Returns a copy of this OffsetDateTime with the time values altered.
|
OffsetDateTime |
OffsetDateTime.withYear(int year)
Returns a copy of this
OffsetDateTime with the year altered. |
OffsetDateTime |
OffsetDateTime.withYear(int year,
DateResolver dateResolver)
Returns a copy of this
OffsetDateTime with the year altered. |
Modifier and Type | Method and Description |
---|---|
static CalendricalRule<OffsetDateTime> |
OffsetDateTime.rule()
Gets the rule for
OffsetDateTime . |
Modifier and Type | Method and Description |
---|---|
int |
OffsetDateTime.compareTo(OffsetDateTime other)
Compares this
OffsetDateTime to another date-time. |
boolean |
OffsetDateTime.equalInstant(OffsetDateTime other)
Checks if the instant of this
OffsetDateTime is equal to that of the specified date-time. |
abstract ZoneRules |
TimeZone.getRulesValidFor(OffsetDateTime dateTime)
Gets the time-zone rules allowing calculations to be performed, ensuring that
the date-time and offset specified is valid for the returned rules.
|
protected abstract OffsetDateTime |
ZoneResolver.handleGap(TimeZone zone,
ZoneRules rules,
ZoneOffsetTransition gapInfo,
LocalDateTime newDateTime,
OffsetDateTime oldDateTime)
Defines the strategy for selecting an offset to use for a local date-time
when the local date-time is in a local time-line gap.
|
protected abstract OffsetDateTime |
ZoneResolver.handleOverlap(TimeZone zone,
ZoneRules rules,
ZoneOffsetTransition overlapInfo,
LocalDateTime newDateTime,
OffsetDateTime oldDateTime)
Defines the strategy for selecting an offset to use for a local date-time
when the local date-time is in a local time-line overlap.
|
boolean |
OffsetDateTime.isAfter(OffsetDateTime other)
Checks if the instant of this
OffsetDateTime is after that of the specified date-time. |
boolean |
OffsetDateTime.isBefore(OffsetDateTime other)
Checks if the instant of this
OffsetDateTime is before that of the specified date-time. |
abstract boolean |
TimeZone.isValidFor(OffsetDateTime dateTime)
Checks if this time-zone is valid such that rules can be obtained for it
which are valid for the specified date-time and offset.
|
static ZonedDateTime |
ZonedDateTime.of(OffsetDateTime dateTime,
TimeZone zone)
Obtains an instance of
ZonedDateTime from an OffsetDateTime
ensuring that the offset provided is valid for the time-zone. |
static ZonedDateTime |
ZonedDateTime.ofInstant(OffsetDateTime dateTime,
TimeZone zone)
Obtains an instance of
ZonedDateTime from the instant of an OffsetDateTime . |
abstract TimeZone |
TimeZone.withLatestVersionValidFor(OffsetDateTime dateTime)
Returns a copy of this time-zone with the latest version that is valid
for the specified date-time and offset.
|
Modifier and Type | Method and Description |
---|---|
OffsetDateTime |
ZoneRulesBuilder.TimeDefinition.createDateTime(LocalDateTime dateTime,
ZoneOffset standardOffset,
ZoneOffset wallOffset)
Creates the offset date-time from the specified local date-time.
|
OffsetDateTime |
ZoneOffsetTransition.getDateTimeAfter()
Gets the transition date-time expressed with the 'after' offset.
|
OffsetDateTime |
ZoneOffsetTransition.getDateTimeBefore()
Gets the transition instant date-time expressed with the 'before' offset.
|
Modifier and Type | Method and Description |
---|---|
String |
ZoneRulesGroup.getLatestVersionIDValidFor(String regionID,
OffsetDateTime dateTime)
Finds the latest version ID that is valid for
|
ZoneRules |
ZoneRulesGroup.getRulesValidFor(String regionID,
String versionID,
OffsetDateTime dateTime)
Gets the rules for the specified region and version ensuring that the rules
are valid for the date-time.
|
boolean |
ZoneRules.isValidDateTime(OffsetDateTime dateTime)
Checks if the offset date-time is valid for these rules.
|
static ZoneOffsetTransition |
ZoneOffsetTransition.of(OffsetDateTime transition,
ZoneOffset offsetAfter)
Obtains an instance defining a transition between two offsets.
|
Copyright © 2014. All rights reserved.