Package dev.frostlake.functions.scalar
Class DateTypeHelper
java.lang.Object
dev.frostlake.functions.scalar.DateTypeHelper
Small shared helper for the date/time functions. The engine represents both DATE and TIMESTAMP values
as strings (and a few functions as
LocalDate / LocalDateTime), so "is this value a pure
DATE?" cannot be answered by type alone — a date-only string (2023-01-31) is a DATE while a
string with a time component is a TIMESTAMP. This decides so DATEADD / DATE_TRUNC can keep DATE inputs
a DATE for day-or-larger units instead of widening them to a timestamp.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisDateOnly(Object value) Whethervaluerepresents a pure DATE (no time-of-day): aLocalDate, or a string of the formyyyy-[m]m-[d]dwith no trailing time.
-
Method Details
-
isDateOnly
Whethervaluerepresents a pure DATE (no time-of-day): aLocalDate, or a string of the formyyyy-[m]m-[d]dwith no trailing time. ALocalDateTimeor a string carrying a time component is NOT date-only.
-