from collections.abc import Iterator
from datetime import tzinfo as _tzinfo
from typing import Self

import numpy as np
from pandas.core.arrays.datetimelike import (
    DatelikeOps,
    TimelikeOps,
)
from pandas.core.arrays.period import PeriodArray
from pandas.core.arrays.string_ import BaseStringArray
from pandas.core.indexes.datetimes import DatetimeIndex
from pandas.core.series import Series

from pandas._libs.tslibs.timestamps import Timestamp
from pandas._typing import (
    Frequency,
    NumpyTimestampDtypeArg,
    PandasTimestampDtypeArg,
    TimeAmbiguous,
    TimeNonexistent,
    TimeZones,
    np_1darray_bool,
    np_1darray_float,
    np_1darray_int32,
    np_1darray_object,
    np_ndarray_dt,
)

from pandas.core.dtypes.dtypes import DatetimeTZDtype as DatetimeTZDtype

class DatetimeArray(TimelikeOps, DatelikeOps):
    __array_priority__: int = 1000
    def __init__(
        self,
        values: np_ndarray_dt | DatetimeIndex | Series[Timestamp] | Self,
        dtype: (
            np.dtype[np.datetime64]
            | NumpyTimestampDtypeArg
            | PandasTimestampDtypeArg
            | None
        ) = None,
        copy: bool = False,
    ) -> None: ...
    @property
    def dtype(  # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] # pyrefly: ignore[bad-override]
        self,
    ) -> np.dtypes.DateTime64DType | DatetimeTZDtype: ...
    @property
    def tz(self) -> _tzinfo | None: ...
    @property
    def tzinfo(self) -> _tzinfo | None: ...
    @property
    def is_normalized(self) -> bool: ...
    def __iter__(self) -> Iterator[Timestamp]: ...
    def tz_convert(self, tz: TimeZones) -> Self: ...
    def tz_localize(
        self,
        tz: TimeZones,
        ambiguous: TimeAmbiguous = "raise",
        nonexistent: TimeNonexistent = "raise",
    ) -> Self: ...
    def to_pydatetime(self) -> np_1darray_object: ...
    def normalize(self) -> Self: ...
    def to_period(self, freq: Frequency | None = None) -> PeriodArray: ...
    def month_name(self, locale: str | None = None) -> BaseStringArray: ...
    def day_name(self, locale: str | None = None) -> BaseStringArray: ...
    @property
    def time(self) -> np_1darray_object: ...
    @property
    def timetz(self) -> np_1darray_object: ...
    @property
    def date(self) -> np_1darray_object: ...
    @property
    def year(self) -> np_1darray_int32: ...
    @property
    def month(self) -> np_1darray_int32: ...
    @property
    def day(self) -> np_1darray_int32: ...
    @property
    def hour(self) -> np_1darray_int32: ...
    @property
    def minute(self) -> np_1darray_int32: ...
    @property
    def second(self) -> np_1darray_int32: ...
    @property
    def microsecond(self) -> np_1darray_int32: ...
    @property
    def nanosecond(self) -> np_1darray_int32: ...
    @property
    def dayofweek(self) -> np_1darray_int32: ...
    @property
    def weekday(self) -> np_1darray_int32: ...
    @property
    def dayofyear(self) -> np_1darray_int32: ...
    @property
    def quarter(self) -> np_1darray_int32: ...
    @property
    def days_in_month(self) -> np_1darray_int32: ...
    @property
    def daysinmonth(self) -> np_1darray_int32: ...
    @property
    def is_month_start(self) -> np_1darray_bool: ...
    @property
    def is_month_end(self) -> np_1darray_bool: ...
    @property
    def is_quarter_start(self) -> np_1darray_bool: ...
    @property
    def is_quarter_end(self) -> np_1darray_bool: ...
    @property
    def is_year_start(self) -> np_1darray_bool: ...
    @property
    def is_year_end(self) -> np_1darray_bool: ...
    @property
    def is_leap_year(self) -> np_1darray_bool: ...
    def to_julian_date(self) -> np_1darray_float: ...
