Skip to content

is_datetime_like

Functions#

is_datetime_like #

is_datetime_like(data: NDArray[Any]) -> bool

Checks if the array has a datetime-like dtype (datetime, timedelta, date)

Source code in tsdat/qc/checkers/is_datetime_like.py
6
7
8
def is_datetime_like(data: NDArray[Any]) -> bool:
    """Checks if the array has a datetime-like dtype (datetime, timedelta, date)"""
    return np.issubdtype(data.dtype, (np.datetime64, np.timedelta64))