Java java.time ZonedDateTime fields, constructors, methods, implement or subclass

Example usage for Java java.time ZonedDateTime fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.time ZonedDateTime.

The text is from its open source code.

Method

intcompareTo(ChronoZonedDateTime other)
Compares this date-time to another date-time, including the chronology.
booleanequals(Object obj)
Checks if this date-time is equal to another date-time.
Stringformat(DateTimeFormatter formatter)
Formats this date-time using the specified formatter.
ZonedDateTimefrom(TemporalAccessor temporal)
Obtains an instance of ZonedDateTime from a temporal object.
intget(TemporalField field)
Gets the value of the specified field from this date-time as an int .
intgetDayOfMonth()
Gets the day-of-month field.
DayOfWeekgetDayOfWeek()
Gets the day-of-week field, which is an enum DayOfWeek .
intgetDayOfYear()
Gets the day-of-year field.
intgetHour()
Gets the hour-of-day field.
longgetLong(TemporalField field)
Gets the value of the specified field from this date-time as a long .
intgetMinute()
Gets the minute-of-hour field.
MonthgetMonth()
Gets the month-of-year field using the Month enum.
intgetMonthValue()
Gets the month-of-year field from 1 to 12.
intgetNano()
Gets the nano-of-second field.
ZoneOffsetgetOffset()
Gets the zone offset, such as '+01:00'.
intgetSecond()
Gets the second-of-minute field.
intgetYear()
Gets the year field.
ZoneIdgetZone()
Gets the time-zone, such as 'Europe/Paris'.
inthashCode()
A hash code for this date-time.
booleanisAfter(ChronoZonedDateTime other)
Checks if the instant of this date-time is after that of the specified date-time.
booleanisBefore(ChronoZonedDateTime other)
Checks if the instant of this date-time is before that of the specified date-time.
booleanisEqual(ChronoZonedDateTime other)
Checks if the instant of this date-time is equal to that of the specified date-time.
booleanisSupported(TemporalField field)
Checks if the specified field is supported.
booleanisSupported(TemporalUnit unit)
Checks if the specified unit is supported.
ZonedDateTimeminus(TemporalAmount amountToSubtract)
Returns a copy of this date-time with the specified amount subtracted.
ZonedDateTimeminus(long amountToSubtract, TemporalUnit unit)
Returns a copy of this date-time with the specified amount subtracted.
ZonedDateTimeminusDays(long days)
Returns a copy of this ZonedDateTime with the specified number of days subtracted.
ZonedDateTimeminusHours(long hours)
Returns a copy of this ZonedDateTime with the specified number of hours subtracted.
ZonedDateTimeminusMinutes(long minutes)
Returns a copy of this ZonedDateTime with the specified number of minutes subtracted.
ZonedDateTimeminusMonths(long months)
Returns a copy of this ZonedDateTime with the specified number of months subtracted.
ZonedDateTimeminusNanos(long nanos)
Returns a copy of this ZonedDateTime with the specified number of nanoseconds subtracted.
ZonedDateTimeminusSeconds(long seconds)
Returns a copy of this ZonedDateTime with the specified number of seconds subtracted.
ZonedDateTimeminusWeeks(long weeks)
Returns a copy of this ZonedDateTime with the specified number of weeks subtracted.
ZonedDateTimeminusYears(long years)
Returns a copy of this ZonedDateTime with the specified number of years subtracted.
ZonedDateTimenow()
Obtains the current date-time from the system clock in the default time-zone.
ZonedDateTimenow(ZoneId zone)
Obtains the current date-time from the system clock in the specified time-zone.
ZonedDateTimenow(Clock clock)
Obtains the current date-time from the specified clock.
ZonedDateTimeof(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.
ZonedDateTimeof(LocalDateTime localDateTime, ZoneId zone)
Obtains an instance of ZonedDateTime from a local date-time.
ZonedDateTimeof(LocalDate date, LocalTime time, ZoneId zone)
Obtains an instance of ZonedDateTime from a local date and time.
ZonedDateTimeofInstant(Instant instant, ZoneId zone)
Obtains an instance of ZonedDateTime from an Instant .
ZonedDateTimeofInstant(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
Obtains an instance of ZonedDateTime from the instant formed by combining the local date-time and offset.
ZonedDateTimeofLocal(LocalDateTime localDateTime, ZoneId zone, ZoneOffset preferredOffset)
Obtains an instance of ZonedDateTime from a local date-time using the preferred offset if possible.
ZonedDateTimeofStrict(LocalDateTime localDateTime, ZoneOffset offset, ZoneId zone)
Obtains an instance of ZonedDateTime strictly validating the combination of local date-time, offset and zone ID.
ZonedDateTimeparse(CharSequence text)
Obtains an instance of ZonedDateTime from a text string such as 2007-12-03T10:15:30+01:00[Europe/Paris] .
ZonedDateTimeparse(CharSequence text, DateTimeFormatter formatter)
Obtains an instance of ZonedDateTime from a text string using a specific formatter.
ZonedDateTimeplus(TemporalAmount amountToAdd)
Returns a copy of this date-time with the specified amount added.
ZonedDateTimeplus(long amountToAdd, TemporalUnit unit)
Returns a copy of this date-time with the specified amount added.
ZonedDateTimeplusDays(long days)
Returns a copy of this ZonedDateTime with the specified number of days added.
ZonedDateTimeplusHours(long hours)
Returns a copy of this ZonedDateTime with the specified number of hours added.
ZonedDateTimeplusMinutes(long minutes)
Returns a copy of this ZonedDateTime with the specified number of minutes added.
ZonedDateTimeplusMonths(long months)
Returns a copy of this ZonedDateTime with the specified number of months added.
ZonedDateTimeplusNanos(long nanos)
Returns a copy of this ZonedDateTime with the specified number of nanoseconds added.
ZonedDateTimeplusSeconds(long seconds)
Returns a copy of this ZonedDateTime with the specified number of seconds added.
ZonedDateTimeplusWeeks(long weeks)
Returns a copy of this ZonedDateTime with the specified number of weeks added.
ZonedDateTimeplusYears(long years)
Returns a copy of this ZonedDateTime with the specified number of years added.
Rquery(TemporalQuery query)
Queries this date-time using the specified query.
ValueRangerange(TemporalField field)
Gets the range of valid values for the specified field.
longtoEpochSecond()
Converts this date-time to the number of seconds from the epoch of 1970-01-01T00:00:00Z.
InstanttoInstant()
Converts this date-time to an Instant .
LocalDatetoLocalDate()
Gets the LocalDate part of this date-time.
LocalDateTimetoLocalDateTime()
Gets the LocalDateTime part of this date-time.
LocalTimetoLocalTime()
Gets the LocalTime part of this date-time.
OffsetDateTimetoOffsetDateTime()
Converts this date-time to an OffsetDateTime .
StringtoString()
Outputs this date-time as a String , such as 2007-12-03T10:15:30+01:00[Europe/Paris] .
ZonedDateTimetruncatedTo(TemporalUnit unit)
Returns a copy of this ZonedDateTime with the time truncated.
longuntil(Temporal endExclusive, TemporalUnit unit)
Calculates the amount of time until another date-time in terms of the specified unit.
ZonedDateTimewith(TemporalField field, long newValue)
Returns a copy of this date-time with the specified field set to a new value.
ZonedDateTimewith(TemporalAdjuster adjuster)
Returns an adjusted copy of this date-time.
ZonedDateTimewithDayOfMonth(int dayOfMonth)
Returns a copy of this ZonedDateTime with the day-of-month altered.
ZonedDateTimewithDayOfYear(int dayOfYear)
Returns a copy of this ZonedDateTime with the day-of-year altered.
ZonedDateTimewithEarlierOffsetAtOverlap()
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.
ZonedDateTimewithFixedOffsetZone()
Returns a copy of this date-time with the zone ID set to the offset.
ZonedDateTimewithHour(int hour)
Returns a copy of this ZonedDateTime with the hour-of-day altered.
ZonedDateTimewithLaterOffsetAtOverlap()
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.
ZonedDateTimewithMinute(int minute)
Returns a copy of this ZonedDateTime with the minute-of-hour altered.
ZonedDateTimewithMonth(int month)
Returns a copy of this ZonedDateTime with the month-of-year altered.
ZonedDateTimewithNano(int nanoOfSecond)
Returns a copy of this ZonedDateTime with the nano-of-second altered.
ZonedDateTimewithSecond(int second)
Returns a copy of this ZonedDateTime with the second-of-minute altered.
ZonedDateTimewithYear(int year)
Returns a copy of this ZonedDateTime with the year altered.
ZonedDateTimewithZoneSameInstant(ZoneId zone)
Returns a copy of this date-time with a different time-zone, retaining the instant.
ZonedDateTimewithZoneSameLocal(ZoneId zone)
Returns a copy of this date-time with a different time-zone, retaining the local date-time if possible.