from __future__ import annotations

import datetime as dt
from typing import Any


def secs_to_nanos(secs: float) -> int: ...
def secs_to_millis(secs: float) -> int: ...
def millis_to_nanos(millis: float) -> int: ...
def micros_to_nanos(micros: float) -> int: ...

def nanos_to_secs(nanos: int) -> float: ...
def nanos_to_millis(nanos: int) -> int: ...
def nanos_to_micros(nanos: int) -> int: ...

def unix_nanos_to_dt(nanos: int) -> dt.datetime: ...

def dt_to_unix_nanos(dt_value: dt.datetime | str | int | float) -> int: ...

def unix_nanos_to_iso8601(unix_nanos: int, nanos_precision: bool = ...) -> str: ...

def format_iso8601(dt_value: dt.datetime, nanos_precision: bool = ...) -> str: ...

def format_optional_iso8601(dt_value: dt.datetime | None, nanos_precision: bool = ...) -> str: ...

def maybe_unix_nanos_to_dt(nanos: int | None) -> dt.datetime | None: ...

def maybe_dt_to_unix_nanos(dt_value: dt.datetime | str | int | float | None) -> int | None: ...

def is_datetime_utc(dt_value: dt.datetime) -> bool: ...

def is_tz_aware(time_object: Any) -> bool: ...

def is_tz_naive(time_object: Any) -> bool: ...

def as_utc_timestamp(dt_value: dt.datetime) -> dt.datetime: ...

def as_utc_index(data: Any) -> Any: ...

def time_object_to_dt(time_object: Any) -> dt.datetime | None: ...

def max_date(date1: dt.datetime | str | int | None = ..., date2: dt.datetime | str | int | None = ...) -> dt.datetime | None: ...

def min_date(date1: dt.datetime | str | int | None = ..., date2: dt.datetime | str | int | None = ...) -> dt.datetime | None: ...

def ensure_pydatetime_utc(timestamp: Any) -> dt.datetime | None: ...
