Package org.apache.iceberg.util
Class DateTimeUtil
java.lang.Object
org.apache.iceberg.util.DateTimeUtil
-
Field Summary
Modifier and TypeFieldDescriptionstatic final OffsetDateTime
static final LocalDate
static final long
static final long
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalDate
dateFromDays
(int daysFromEpoch) static int
daysFromDate
(LocalDate date) static int
daysFromInstant
(Instant instant) static String
daysToIsoDate
(int days) static int
daysToMonths
(int days) static int
daysToYears
(int days) static String
formatTimestampMillis
(long millis) static int
isoDateToDays
(String dateString) static long
isoTimestampToMicros
(String timestampString) static long
isoTimestamptzToMicros
(String timestampString) static long
isoTimeToMicros
(String timeString) static boolean
isUTCTimestamptz
(String timestampString) static long
microsFromInstant
(Instant instant) static long
microsFromTime
(LocalTime time) static long
microsFromTimestamp
(LocalDateTime dateTime) static long
microsFromTimestamptz
(OffsetDateTime dateTime) static int
microsToDays
(long micros) static int
microsToHours
(long micros) static String
microsToIsoTime
(long micros) static String
microsToIsoTimestamp
(long micros) static String
microsToIsoTimestamptz
(long micros) static long
microsToMillis
(long micros) static int
microsToMonths
(long micros) static int
microsToYears
(long micros) static LocalTime
timeFromMicros
(long microFromMidnight) static LocalDateTime
timestampFromMicros
(long microsFromEpoch) static OffsetDateTime
timestamptzFromMicros
(long microsFromEpoch)
-
Field Details
-
EPOCH
-
EPOCH_DAY
-
MICROS_PER_MILLIS
public static final long MICROS_PER_MILLIS- See Also:
-
MICROS_PER_SECOND
public static final long MICROS_PER_SECOND- See Also:
-
-
Method Details
-
dateFromDays
-
daysFromDate
-
daysFromInstant
-
timeFromMicros
-
microsFromTime
-
timestampFromMicros
-
microsFromInstant
-
microsFromTimestamp
-
microsToMillis
public static long microsToMillis(long micros) -
timestamptzFromMicros
-
microsFromTimestamptz
-
formatTimestampMillis
-
daysToIsoDate
-
microsToIsoTime
-
microsToIsoTimestamptz
-
microsToIsoTimestamp
-
isoDateToDays
-
isoTimeToMicros
-
isoTimestamptzToMicros
-
isUTCTimestamptz
-
isoTimestampToMicros
-
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)
-