def is_datetime_arraylike(arr):
if isinstance(arr, ABCDatetimeIndex):<EOL><INDENT>return True<EOL><DEDENT>elif isinstance(arr, (np.ndarray, ABCSeries)):<EOL><INDENT>return (is_object_dtype(arr.dtype)<EOL>and lib.infer_dtype(arr, skipna=False) == '<STR_LIT>')<EOL><DEDENT>return getattr(arr, '<STR_LIT>', None) == '<STR_LIT>'<EOL>
Check whether an array-like is a datetime array-like or DatetimeIndex.

Parameters
----------
arr : array-like
    The array-like to check.

Returns
-------
boolean
    Whether or not the array-like is a datetime array-like or
    DatetimeIndex.

Examples
--------
>>> is_datetime_arraylike([1, 2, 3])
False
>>> is_datetime_arraylike(pd.Index([1, 2, 3]))
False
>>> is_datetime_arraylike(pd.DatetimeIndex([1, 2, 3]))
True