Class DateTimeUtil


  • public class DateTimeUtil
    extends java.lang.Object
    • Field Detail

      • EPOCH

        public static final java.time.OffsetDateTime EPOCH
      • EPOCH_DAY

        public static final java.time.LocalDate EPOCH_DAY
    • Method Detail

      • dateFromDays

        public static java.time.LocalDate dateFromDays​(int daysFromEpoch)
      • daysFromDate

        public static int daysFromDate​(java.time.LocalDate date)
      • daysFromInstant

        public static int daysFromInstant​(java.time.Instant instant)
      • timeFromMicros

        public static java.time.LocalTime timeFromMicros​(long microFromMidnight)
      • microsFromTime

        public static long microsFromTime​(java.time.LocalTime time)
      • timestampFromMicros

        public static java.time.LocalDateTime timestampFromMicros​(long microsFromEpoch)
      • microsFromInstant

        public static long microsFromInstant​(java.time.Instant instant)
      • microsFromTimestamp

        public static long microsFromTimestamp​(java.time.LocalDateTime dateTime)
      • microsToMillis

        public static long microsToMillis​(long micros)
      • timestamptzFromMicros

        public static java.time.OffsetDateTime timestamptzFromMicros​(long microsFromEpoch)
      • microsFromTimestamptz

        public static long microsFromTimestamptz​(java.time.OffsetDateTime dateTime)
      • formatTimestampMillis

        public static java.lang.String formatTimestampMillis​(long millis)
      • daysToIsoDate

        public static java.lang.String daysToIsoDate​(int days)
      • microsToIsoTime

        public static java.lang.String microsToIsoTime​(long micros)
      • microsToIsoTimestamptz

        public static java.lang.String microsToIsoTimestamptz​(long micros)
      • microsToIsoTimestamp

        public static java.lang.String microsToIsoTimestamp​(long micros)
      • isoDateToDays

        public static int isoDateToDays​(java.lang.String dateString)
      • isoTimeToMicros

        public static long isoTimeToMicros​(java.lang.String timeString)
      • isoTimestamptzToMicros

        public static long isoTimestamptzToMicros​(java.lang.String timestampString)
      • isUTCTimestamptz

        public static boolean isUTCTimestamptz​(java.lang.String timestampString)
      • isoTimestampToMicros

        public static long isoTimestampToMicros​(java.lang.String timestampString)
      • daysToYears

        public static int daysToYears​(int days)
      • daysToMonths

        public static int daysToMonths​(int days)
      • microsToYears

        public static int microsToYears​(long micros)
      • microsToMonths

        public static int microsToMonths​(long micros)
      • microsToDays

        public static int microsToDays​(long micros)
      • microsToHours

        public static int microsToHours​(long micros)