public class DateTimeUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.time.OffsetDateTime |
EPOCH |
static java.time.LocalDate |
EPOCH_DAY |
static long |
MICROS_PER_MILLIS |
static long |
MICROS_PER_SECOND |
Modifier and Type | Method and Description |
---|---|
static java.time.LocalDate |
dateFromDays(int daysFromEpoch) |
static int |
daysFromDate(java.time.LocalDate date) |
static int |
daysFromInstant(java.time.Instant instant) |
static java.lang.String |
daysToIsoDate(int days) |
static int |
daysToMonths(int days) |
static int |
daysToYears(int days) |
static java.lang.String |
formatTimestampMillis(long millis) |
static int |
isoDateToDays(java.lang.String dateString) |
static long |
isoTimestampToMicros(java.lang.String timestampString) |
static long |
isoTimestamptzToMicros(java.lang.String timestampString) |
static long |
isoTimeToMicros(java.lang.String timeString) |
static boolean |
isUTCTimestamptz(java.lang.String timestampString) |
static long |
microsFromInstant(java.time.Instant instant) |
static long |
microsFromTime(java.time.LocalTime time) |
static long |
microsFromTimestamp(java.time.LocalDateTime dateTime) |
static long |
microsFromTimestamptz(java.time.OffsetDateTime dateTime) |
static int |
microsToDays(long micros) |
static int |
microsToHours(long micros) |
static java.lang.String |
microsToIsoTime(long micros) |
static java.lang.String |
microsToIsoTimestamp(long micros) |
static java.lang.String |
microsToIsoTimestamptz(long micros) |
static long |
microsToMillis(long micros) |
static int |
microsToMonths(long micros) |
static int |
microsToYears(long micros) |
static java.time.LocalTime |
timeFromMicros(long microFromMidnight) |
static java.time.LocalDateTime |
timestampFromMicros(long microsFromEpoch) |
static java.time.OffsetDateTime |
timestamptzFromMicros(long microsFromEpoch) |
public static final java.time.OffsetDateTime EPOCH
public static final java.time.LocalDate EPOCH_DAY
public static final long MICROS_PER_MILLIS
public static final long MICROS_PER_SECOND
public static java.time.LocalDate dateFromDays(int daysFromEpoch)
public static int daysFromDate(java.time.LocalDate date)
public static int daysFromInstant(java.time.Instant instant)
public static java.time.LocalTime timeFromMicros(long microFromMidnight)
public static long microsFromTime(java.time.LocalTime time)
public static java.time.LocalDateTime timestampFromMicros(long microsFromEpoch)
public static long microsFromInstant(java.time.Instant instant)
public static long microsFromTimestamp(java.time.LocalDateTime dateTime)
public static long microsToMillis(long micros)
public static java.time.OffsetDateTime timestamptzFromMicros(long microsFromEpoch)
public static long microsFromTimestamptz(java.time.OffsetDateTime dateTime)
public static java.lang.String formatTimestampMillis(long millis)
public static java.lang.String daysToIsoDate(int days)
public static java.lang.String microsToIsoTime(long micros)
public static java.lang.String microsToIsoTimestamptz(long micros)
public static java.lang.String microsToIsoTimestamp(long micros)
public static int isoDateToDays(java.lang.String dateString)
public static long isoTimeToMicros(java.lang.String timeString)
public static long isoTimestamptzToMicros(java.lang.String timestampString)
public static boolean isUTCTimestamptz(java.lang.String timestampString)
public static long isoTimestampToMicros(java.lang.String timestampString)
public static int daysToYears(int days)
public static int daysToMonths(int days)
public static int microsToYears(long micros)
public static int microsToMonths(long micros)
public static int microsToDays(long micros)
public static int microsToHours(long micros)