TemporalQueries.zoneId

A strict query for the {@code ZoneId}. !(p) This queries a {@code TemporalAccessor} for the zone. The zone is only returned if the date-time conceptually contains a {@code ZoneId}. It will not be returned if the date-time only conceptually has an {@code ZoneOffset}. Thus a {@link hunt.time.ZonedDateTime} will return the result of {@code getZone()}, but an {@link hunt.time.OffsetDateTime} will return null. !(p) In most cases, applications should use {@link #zone()} as this query is too strict. !(p) The result from JDK classes implementing {@code TemporalAccessor} is as follows:!(br) {@code LocalDate} returns null!(br) {@code LocalTime} returns null!(br) {@code LocalDateTime} returns null!(br) {@code ZonedDateTime} returns the associated zone!(br) {@code OffsetTime} returns null!(br) {@code OffsetDateTime} returns null!(br) {@code ChronoLocalDate} returns null!(br) {@code ChronoLocalDateTime} returns null!(br) {@code ChronoZonedDateTime} returns the associated zone!(br) {@code Era} returns null!(br) {@code DayOfWeek} returns null!(br) {@code Month} returns null!(br) {@code Year} returns null!(br) {@code YearMonth} returns null!(br) {@code MonthDay} returns null!(br) {@code ZoneOffset} returns null!(br) {@code Instant} returns null!(br)

@return a query that can obtain the zone ID of a temporal, not null

class TemporalQueries
static
zoneId
()

Meta