Example usage for Java java.time ZonedDateTime fields, constructors, methods, implement or subclass
The text is from its open source code.
int | compareTo(ChronoZonedDateTime> other) Compares this date-time to another date-time, including the chronology. |
boolean | equals(Object obj) Checks if this date-time is equal to another date-time. |
String | format(DateTimeFormatter formatter) Formats this date-time using the specified formatter. |
ZonedDateTime | from(TemporalAccessor temporal) Obtains an instance of ZonedDateTime from a temporal object. |
int | get(TemporalField field) Gets the value of the specified field from this date-time as an int . |
int | getDayOfMonth() Gets the day-of-month field. |
DayOfWeek | getDayOfWeek() Gets the day-of-week field, which is an enum DayOfWeek . |
int | getDayOfYear() Gets the day-of-year field. |
int | getHour() Gets the hour-of-day field. |
long | getLong(TemporalField field) Gets the value of the specified field from this date-time as a long . |
int | getMinute() Gets the minute-of-hour field. |
Month | getMonth() Gets the month-of-year field using the Month enum. |
int | getMonthValue() Gets the month-of-year field from 1 to 12. |
int | getNano() Gets the nano-of-second field. |
ZoneOffset | getOffset() Gets the zone offset, such as '+01:00'. |
int | getSecond() Gets the second-of-minute field. |
int | getYear() Gets the year field. |
ZoneId | getZone() Gets the time-zone, such as 'Europe/Paris'. |
int | hashCode() A hash code for this date-time. |
boolean | isAfter(ChronoZonedDateTime> other) Checks if the instant of this date-time is after that of the specified date-time. |
boolean | isBefore(ChronoZonedDateTime> other) Checks if the instant of this date-time is before that of the specified date-time. |
boolean | isEqual(ChronoZonedDateTime> other) Checks if the instant of this date-time is equal to that of the specified date-time. |
boolean | isSupported(TemporalField field) Checks if the specified field is supported. |
boolean | isSupported(TemporalUnit unit) Checks if the specified unit is supported. |
ZonedDateTime | minus(TemporalAmount amountToSubtract) Returns a copy of this date-time with the specified amount subtracted. |
ZonedDateTime | minus(long amountToSubtract, TemporalUnit unit) Returns a copy of this date-time with the specified amount subtracted. |
ZonedDateTime | minusDays(long days) Returns a copy of this ZonedDateTime with the specified number of days subtracted. |
ZonedDateTime | minusHours(long hours) Returns a copy of this ZonedDateTime with the specified number of hours subtracted. |
ZonedDateTime | minusMinutes(long minutes) Returns a copy of this ZonedDateTime with the specified number of minutes subtracted. |
ZonedDateTime | minusMonths(long months) Returns a copy of this ZonedDateTime with the specified number of months subtracted. |
ZonedDateTime | minusNanos(long nanos) Returns a copy of this ZonedDateTime with the specified number of nanoseconds subtracted. |
ZonedDateTime | minusSeconds(long seconds) Returns a copy of this ZonedDateTime with the specified number of seconds subtracted. |
ZonedDateTime | minusWeeks(long weeks) Returns a copy of this ZonedDateTime with the specified number of weeks subtracted. |
ZonedDateTime | minusYears(long years) Returns a copy of this ZonedDateTime with the specified number of years subtracted. |
ZonedDateTime | now() Obtains the current date-time from the system clock in the default time-zone. |
ZonedDateTime | now(ZoneId zone) Obtains the current date-time from the system clock in the specified time-zone. |
ZonedDateTime | now(Clock clock) Obtains the current date-time from the specified clock. |
ZonedDateTime | of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone) Obtains an instance of ZonedDateTime from a year, month, day, hour, minute, second, nanosecond and time-zone. |
ZonedDateTime | of(LocalDateTime localDateTime, ZoneId zone) Obtains an instance of ZonedDateTime from a local date-time. |
ZonedDateTime | of(LocalDate date, LocalTime time, ZoneId zone) Obtains an instance of ZonedDateTime from a local date and time. |
ZonedDateTime | ofInstant(Instant instant, ZoneId zone) Obtains an instance of ZonedDateTime from an Instant . |
ZonedDateTime | ofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) Obtains an instance of ZonedDateTime from the instant formed by combining the local date-time and offset. |
ZonedDateTime | ofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset) Obtains an instance of ZonedDateTime from a local date-time using the preferred offset if possible. |
ZonedDateTime | ofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone) Obtains an instance of ZonedDateTime strictly validating the combination of local date-time, offset and zone ID. |
ZonedDateTime | parse(CharSequence text) Obtains an instance of ZonedDateTime from a text string such as 2007-12-03T10:15:30+01:00[Europe/Paris] . |
ZonedDateTime | parse(CharSequence text, DateTimeFormatter formatter) Obtains an instance of ZonedDateTime from a text string using a specific formatter. |
ZonedDateTime | plus(TemporalAmount amountToAdd) Returns a copy of this date-time with the specified amount added. |
ZonedDateTime | plus(long amountToAdd, TemporalUnit unit) Returns a copy of this date-time with the specified amount added. |
ZonedDateTime | plusDays(long days) Returns a copy of this ZonedDateTime with the specified number of days added. |
ZonedDateTime | plusHours(long hours) Returns a copy of this ZonedDateTime with the specified number of hours added. |
ZonedDateTime | plusMinutes(long minutes) Returns a copy of this ZonedDateTime with the specified number of minutes added. |
ZonedDateTime | plusMonths(long months) Returns a copy of this ZonedDateTime with the specified number of months added. |
ZonedDateTime | plusNanos(long nanos) Returns a copy of this ZonedDateTime with the specified number of nanoseconds added. |
ZonedDateTime | plusSeconds(long seconds) Returns a copy of this ZonedDateTime with the specified number of seconds added. |
ZonedDateTime | plusWeeks(long weeks) Returns a copy of this ZonedDateTime with the specified number of weeks added. |
ZonedDateTime | plusYears(long years) Returns a copy of this ZonedDateTime with the specified number of years added. |
R | query(TemporalQuery Queries this date-time using the specified query. |
ValueRange | range(TemporalField field) Gets the range of valid values for the specified field. |
long | toEpochSecond() Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z. |
Instant | toInstant() Converts this date-time to an Instant . |
LocalDate | toLocalDate() Gets the LocalDate part of this date-time. |
LocalDateTime | toLocalDateTime() Gets the LocalDateTime part of this date-time. |
LocalTime | toLocalTime() Gets the LocalTime part of this date-time. |
OffsetDateTime | toOffsetDateTime() Converts this date-time to an OffsetDateTime . |
String | toString() Outputs this date-time as a String , such as 2007-12-03T10:15:30+01:00[Europe/Paris] . |
ZonedDateTime | truncatedTo(TemporalUnit unit) Returns a copy of this ZonedDateTime with the time truncated. |
long | until(Temporal endExclusive, TemporalUnit unit) Calculates the amount of time until another date-time in terms of the specified unit. |
ZonedDateTime | with(TemporalField field, long newValue) Returns a copy of this date-time with the specified field set to a new value. |
ZonedDateTime | with(TemporalAdjuster adjuster) Returns an adjusted copy of this date-time. |
ZonedDateTime | withDayOfMonth(int dayOfMonth) Returns a copy of this ZonedDateTime with the day-of-month altered. |
ZonedDateTime | withDayOfYear(int dayOfYear) Returns a copy of this ZonedDateTime with the day-of-year altered. |
ZonedDateTime | withEarlierOffsetAtOverlap() Returns a copy of this date-time changing the zone offset to the earlier of the two valid offsets at a local time-line overlap. |
ZonedDateTime | withFixedOffsetZone() Returns a copy of this date-time with the zone ID set to the offset. |
ZonedDateTime | withHour(int hour) Returns a copy of this ZonedDateTime with the hour-of-day altered. |
ZonedDateTime | withLaterOffsetAtOverlap() Returns a copy of this date-time changing the zone offset to the later of the two valid offsets at a local time-line overlap. |
ZonedDateTime | withMinute(int minute) Returns a copy of this ZonedDateTime with the minute-of-hour altered. |
ZonedDateTime | withMonth(int month) Returns a copy of this ZonedDateTime with the month-of-year altered. |
ZonedDateTime | withNano(int nanoOfSecond) Returns a copy of this ZonedDateTime with the nano-of-second altered. |
ZonedDateTime | withSecond(int second) Returns a copy of this ZonedDateTime with the second-of-minute altered. |
ZonedDateTime | withYear(int year) Returns a copy of this ZonedDateTime with the year altered. |
ZonedDateTime | withZoneSameInstant(ZoneId zone) Returns a copy of this date-time with a different time-zone, retaining the instant. |
ZonedDateTime | withZoneSameLocal(ZoneId zone) Returns a copy of this date-time with a different time-zone, retaining the local date-time if possible. |