Skip to main content

is_valid_date

Function is_valid_date 

Source
pub const fn is_valid_date(date: Date) -> bool
Expand description

Returns true if DuckDB can represent date as a DATE.

This is DuckDB’s own Date::IsValid: the month is 1–12, the day exists in that month of that (proleptic Gregorian) year, and the date lies between 5877642-06-25 BC and 5881580-07-10. date_to_days returns None exactly when this returns false.