import datetime
from collections.abc import Sequence
from typing import overload

import numpy as np
import numpy.typing as npt

TZ = str | datetime.tzinfo

def _get_tzinfo(tz: TZ | None=None) -> datetime.tzinfo: ...
def _reset_epoch_test_example() -> None: ...
def set_epoch(epoch: str) -> None: ...
def get_epoch() -> str: ...
def _dt64_to_ordinalf(d: npt.NDArray[np.datetime64]) -> npt.NDArray[np.floating]: ...
def _from_ordinalf(x: float, tz: TZ | None=None) -> datetime.datetime: ...
# Ideally str | Sequence[str] would get an override, but because a str is a valid Sequence[str],
# it's not possible to distinguish between them in the type system
# See https://github.com/python/typing/issues/256
def datestr2num(d: str | Sequence[str], default: datetime.datetime | None=None) -> float | npt.NDArray[np.floating]: ...

@overload
def date2num(d: datetime.datetime | np.datetime64) -> float: ...
@overload
def date2num(d: Sequence[datetime.datetime] | Sequence[np.datetime64]) -> npt.NDArray[np.floating]: ...

@overload
def num2date(x: float, tz: TZ | None=None) -> datetime.datetime: ...
@overload
def num2date(x: Sequence[float], tz: TZ | None=None) -> list[datetime.datetime]: ...

@overload
def num2timedelta(x: float) -> datetime.timedelta: ...
@overload
def num2timedelta(x: Sequence[float]) -> list[datetime.timedelta]: ...

def drange(dstart: datetime.datetime, dend: datetime.datetime, delta: datetime.timedelta) -> npt.NDArray[np.floating]: ...
def _wrap_in_tex(text: str) -> str: ...
