Class JodaCompatibleZonedDateTime

  • All Implemented Interfaces:
    java.lang.Comparable<java.time.chrono.ChronoZonedDateTime<?>>, java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>, java.time.temporal.Temporal, java.time.temporal.TemporalAccessor

    public class JodaCompatibleZonedDateTime
    extends java.lang.Object
    implements java.lang.Comparable<java.time.chrono.ChronoZonedDateTime<?>>, java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>, java.time.temporal.Temporal, java.time.temporal.TemporalAccessor
    A wrapper around ZonedDateTime that exposes joda methods for backcompat.
    • Constructor Detail

      • JodaCompatibleZonedDateTime

        public JodaCompatibleZonedDateTime​(java.time.Instant instant,
                                           java.time.ZoneId zone)
    • Method Detail

      • getZonedDateTime

        public java.time.ZonedDateTime getZonedDateTime()
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Overrides:
        toString in class java.lang.Object
      • format

        public java.lang.String format​(java.time.format.DateTimeFormatter formatter)
        Specified by:
        format in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • range

        public java.time.temporal.ValueRange range​(java.time.temporal.TemporalField field)
        Specified by:
        range in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        range in interface java.time.temporal.TemporalAccessor
      • get

        public int get​(java.time.temporal.TemporalField field)
        Specified by:
        get in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        get in interface java.time.temporal.TemporalAccessor
      • getLong

        public long getLong​(java.time.temporal.TemporalField field)
        Specified by:
        getLong in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        getLong in interface java.time.temporal.TemporalAccessor
      • getChronology

        public java.time.chrono.Chronology getChronology()
        Specified by:
        getChronology in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • getOffset

        public java.time.ZoneOffset getOffset()
        Specified by:
        getOffset in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • isSupported

        public boolean isSupported​(java.time.temporal.TemporalField field)
        Specified by:
        isSupported in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        isSupported in interface java.time.temporal.TemporalAccessor
      • isSupported

        public boolean isSupported​(java.time.temporal.TemporalUnit unit)
        Specified by:
        isSupported in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        isSupported in interface java.time.temporal.Temporal
      • toEpochSecond

        public long toEpochSecond()
        Specified by:
        toEpochSecond in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • compareTo

        public int compareTo​(java.time.chrono.ChronoZonedDateTime<?> other)
        Specified by:
        compareTo in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        compareTo in interface java.lang.Comparable<java.time.chrono.ChronoZonedDateTime<?>>
      • isBefore

        public boolean isBefore​(java.time.chrono.ChronoZonedDateTime<?> other)
        Specified by:
        isBefore in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • isAfter

        public boolean isAfter​(java.time.chrono.ChronoZonedDateTime<?> other)
        Specified by:
        isAfter in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • isEqual

        public boolean isEqual​(java.time.chrono.ChronoZonedDateTime<?> other)
        Specified by:
        isEqual in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • toLocalTime

        public java.time.LocalTime toLocalTime()
        Specified by:
        toLocalTime in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • getDayOfMonth

        public int getDayOfMonth()
      • getDayOfYear

        public int getDayOfYear()
      • getHour

        public int getHour()
      • toLocalDate

        public java.time.LocalDate toLocalDate()
        Specified by:
        toLocalDate in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • toLocalDateTime

        public java.time.LocalDateTime toLocalDateTime()
        Specified by:
        toLocalDateTime in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • getMinute

        public int getMinute()
      • getMonth

        public java.time.Month getMonth()
      • getMonthValue

        public int getMonthValue()
      • getNano

        public int getNano()
      • getSecond

        public int getSecond()
      • getYear

        public int getYear()
      • getZone

        public java.time.ZoneId getZone()
        Specified by:
        getZone in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • minus

        public java.time.ZonedDateTime minus​(java.time.temporal.TemporalAmount delta)
        Specified by:
        minus in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        minus in interface java.time.temporal.Temporal
      • minus

        public java.time.ZonedDateTime minus​(long amount,
                                             java.time.temporal.TemporalUnit unit)
        Specified by:
        minus in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        minus in interface java.time.temporal.Temporal
      • query

        public <R> R query​(java.time.temporal.TemporalQuery<R> query)
        Specified by:
        query in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        query in interface java.time.temporal.TemporalAccessor
      • until

        public long until​(java.time.temporal.Temporal temporal,
                          java.time.temporal.TemporalUnit temporalUnit)
        Specified by:
        until in interface java.time.temporal.Temporal
      • minusYears

        public java.time.ZonedDateTime minusYears​(long amount)
      • minusMonths

        public java.time.ZonedDateTime minusMonths​(long amount)
      • minusWeeks

        public java.time.ZonedDateTime minusWeeks​(long amount)
      • minusDays

        public java.time.ZonedDateTime minusDays​(long amount)
      • minusHours

        public java.time.ZonedDateTime minusHours​(long amount)
      • minusMinutes

        public java.time.ZonedDateTime minusMinutes​(long amount)
      • minusSeconds

        public java.time.ZonedDateTime minusSeconds​(long amount)
      • minusNanos

        public java.time.ZonedDateTime minusNanos​(long amount)
      • plus

        public java.time.ZonedDateTime plus​(java.time.temporal.TemporalAmount amount)
        Specified by:
        plus in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        plus in interface java.time.temporal.Temporal
      • plus

        public java.time.ZonedDateTime plus​(long amount,
                                            java.time.temporal.TemporalUnit unit)
        Specified by:
        plus in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        plus in interface java.time.temporal.Temporal
      • plusDays

        public java.time.ZonedDateTime plusDays​(long amount)
      • plusHours

        public java.time.ZonedDateTime plusHours​(long amount)
      • plusMinutes

        public java.time.ZonedDateTime plusMinutes​(long amount)
      • plusMonths

        public java.time.ZonedDateTime plusMonths​(long amount)
      • plusNanos

        public java.time.ZonedDateTime plusNanos​(long amount)
      • plusSeconds

        public java.time.ZonedDateTime plusSeconds​(long amount)
      • plusWeeks

        public java.time.ZonedDateTime plusWeeks​(long amount)
      • plusYears

        public java.time.ZonedDateTime plusYears​(long amount)
      • toInstant

        public java.time.Instant toInstant()
        Specified by:
        toInstant in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • toOffsetDateTime

        public java.time.OffsetDateTime toOffsetDateTime()
      • truncatedTo

        public java.time.ZonedDateTime truncatedTo​(java.time.temporal.TemporalUnit unit)
      • with

        public java.time.ZonedDateTime with​(java.time.temporal.TemporalAdjuster adjuster)
        Specified by:
        with in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        with in interface java.time.temporal.Temporal
      • with

        public java.time.ZonedDateTime with​(java.time.temporal.TemporalField field,
                                            long newValue)
        Specified by:
        with in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
        Specified by:
        with in interface java.time.temporal.Temporal
      • withDayOfMonth

        public java.time.ZonedDateTime withDayOfMonth​(int value)
      • withDayOfYear

        public java.time.ZonedDateTime withDayOfYear​(int value)
      • withEarlierOffsetAtOverlap

        public java.time.ZonedDateTime withEarlierOffsetAtOverlap()
        Specified by:
        withEarlierOffsetAtOverlap in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • withFixedOffsetZone

        public java.time.ZonedDateTime withFixedOffsetZone()
      • withHour

        public java.time.ZonedDateTime withHour​(int value)
      • withLaterOffsetAtOverlap

        public java.time.ZonedDateTime withLaterOffsetAtOverlap()
        Specified by:
        withLaterOffsetAtOverlap in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • withMinute

        public java.time.ZonedDateTime withMinute​(int value)
      • withMonth

        public java.time.ZonedDateTime withMonth​(int value)
      • withNano

        public java.time.ZonedDateTime withNano​(int value)
      • withSecond

        public java.time.ZonedDateTime withSecond​(int value)
      • withYear

        public java.time.ZonedDateTime withYear​(int value)
      • withZoneSameLocal

        public java.time.ZonedDateTime withZoneSameLocal​(java.time.ZoneId zone)
        Specified by:
        withZoneSameLocal in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • withZoneSameInstant

        public java.time.ZonedDateTime withZoneSameInstant​(java.time.ZoneId zone)
        Specified by:
        withZoneSameInstant in interface java.time.chrono.ChronoZonedDateTime<java.time.LocalDate>
      • getMillis

        @Deprecated
        public long getMillis()
        Deprecated.
      • getCenturyOfEra

        @Deprecated
        public int getCenturyOfEra()
        Deprecated.
      • getEra

        @Deprecated
        public int getEra()
        Deprecated.
      • getHourOfDay

        @Deprecated
        public int getHourOfDay()
        Deprecated.
      • getMillisOfDay

        @Deprecated
        public int getMillisOfDay()
        Deprecated.
      • getMillisOfSecond

        @Deprecated
        public int getMillisOfSecond()
        Deprecated.
      • getMinuteOfDay

        @Deprecated
        public int getMinuteOfDay()
        Deprecated.
      • getMinuteOfHour

        @Deprecated
        public int getMinuteOfHour()
        Deprecated.
      • getMonthOfYear

        @Deprecated
        public int getMonthOfYear()
        Deprecated.
      • getSecondOfDay

        @Deprecated
        public int getSecondOfDay()
        Deprecated.
      • getSecondOfMinute

        @Deprecated
        public int getSecondOfMinute()
        Deprecated.
      • getWeekOfWeekyear

        @Deprecated
        public int getWeekOfWeekyear()
        Deprecated.
      • getWeekyear

        @Deprecated
        public int getWeekyear()
        Deprecated.
      • getYearOfCentury

        @Deprecated
        public int getYearOfCentury()
        Deprecated.
      • getYearOfEra

        @Deprecated
        public int getYearOfEra()
        Deprecated.
      • toString

        @Deprecated
        public java.lang.String toString​(java.lang.String format)
        Deprecated.
      • toString

        @Deprecated
        public java.lang.String toString​(java.lang.String format,
                                         java.util.Locale locale)
        Deprecated.
      • getDayOfWeekEnum

        public java.time.DayOfWeek getDayOfWeekEnum()
      • getDayOfWeek

        @Deprecated
        public int getDayOfWeek()
        Deprecated.