Package org.apache.arrow.vector.util
Class DateUtility
java.lang.Object
org.apache.arrow.vector.util.DateUtility
Utility class for Date, DateTime, TimeStamp, Interval data types.
-
Field Summary
Modifier and TypeFieldDescriptionstatic DateTimeFormatter
static final int
static final DateTimeFormatter
static final DateTimeFormatter
static final DateTimeFormatter
static final DateTimeFormatter
static final int
static final int
static final long
static final int
static final int
static DateTimeFormatter
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeFormatter
Returns the date time formatter used to parse date strings.static LocalDateTime
getLocalDateTimeFromEpochMicro
(long epochMicros) Convert microseconds from epoch to a LocalDateTime with UTC offset.static LocalDateTime
getLocalDateTimeFromEpochMicro
(long epochMicros, String timeZone) Convert microseconds from epoch to a LocalDateTime with timeZone offset.static LocalDateTime
getLocalDateTimeFromEpochMilli
(long epochMillis) Convert milliseconds from epoch to a LocalDateTime with UTC offset.static LocalDateTime
getLocalDateTimeFromEpochMilli
(long epochMillis, String timeZone) Convert milliseconds from epoch to a LocalDateTime with timeZone offset.static LocalDateTime
getLocalDateTimeFromEpochNano
(long epochNanos) Convert nanoseconds from epoch to a LocalDateTime with UTC offset.static LocalDateTime
getLocalDateTimeFromEpochNano
(long epochNanos, String timeZone) Convert nanoseconds from epoch to a LocalDateTime with timeZone offset.static DateTimeFormatter
Returns time formatter used to parse time strings.
-
Field Details
-
formatDate
-
formatTimeStampMilli
-
formatTimeStampTZ
-
formatTime
-
dateTimeTZFormat
-
timeFormat
-
yearsToMonths
public static final int yearsToMonths- See Also:
-
hoursToMillis
public static final int hoursToMillis- See Also:
-
minutesToMillis
public static final int minutesToMillis- See Also:
-
secondsToMillis
public static final int secondsToMillis- See Also:
-
monthToStandardDays
public static final int monthToStandardDays- See Also:
-
monthsToMillis
public static final long monthsToMillis- See Also:
-
daysToStandardMillis
public static final int daysToStandardMillis- See Also:
-
-
Method Details
-
getDateTimeFormatter
Returns the date time formatter used to parse date strings. -
getTimeFormatter
Returns time formatter used to parse time strings. -
getLocalDateTimeFromEpochMilli
Convert milliseconds from epoch to a LocalDateTime with timeZone offset.- Parameters:
epochMillis
- milliseconds from epochtimeZone
- current timeZone- Returns:
- LocalDateTime object with timeZone offset
-
getLocalDateTimeFromEpochMilli
Convert milliseconds from epoch to a LocalDateTime with UTC offset. -
getLocalDateTimeFromEpochMicro
Convert microseconds from epoch to a LocalDateTime with timeZone offset.- Parameters:
epochMicros
- microseconds from epochtimeZone
- current timeZone- Returns:
- LocalDateTime object with timeZone offset
-
getLocalDateTimeFromEpochMicro
Convert microseconds from epoch to a LocalDateTime with UTC offset. -
getLocalDateTimeFromEpochNano
Convert nanoseconds from epoch to a LocalDateTime with timeZone offset.- Parameters:
epochNanos
- nanoseconds from epochtimeZone
- current timeZone- Returns:
- LocalDateTime object with timeZone offset
-
getLocalDateTimeFromEpochNano
Convert nanoseconds from epoch to a LocalDateTime with UTC offset.
-