from .base import BaseTemplateExtension as BaseTemplateExtension, TemplateFunction as TemplateFunction
from _typeshed import Incomplete
from datetime import datetime, timedelta
from homeassistant.helpers.template import TemplateEnvironment as TemplateEnvironment
from homeassistant.helpers.template.helpers import raise_no_default as raise_no_default
from homeassistant.helpers.template.render_info import render_info_cv as render_info_cv
from typing import Any

_SENTINEL: Incomplete
DATE_STR_FORMAT: str

class DateTimeExtension(BaseTemplateExtension):
    def __init__(self, environment: TemplateEnvironment) -> None: ...
    def timestamp_custom(self, value: Any, date_format: str = ..., local: bool = True, default: Any = ...) -> Any: ...
    def timestamp_local(self, value: Any, default: Any = ...) -> Any: ...
    def timestamp_utc(self, value: Any, default: Any = ...) -> Any: ...
    def as_timestamp(self, value: Any, default: Any = ...) -> Any: ...
    def as_datetime(self, value: Any, default: Any = ...) -> Any: ...
    def as_timedelta(self, value: str) -> timedelta | None: ...
    def strptime(self, string: str, fmt: str, default: Any = ...) -> Any: ...
    def as_local(self, value: datetime) -> datetime: ...
    def is_datetime(self, value: Any) -> bool: ...
    def now(self) -> datetime: ...
    def utcnow(self) -> datetime: ...
    def today_at(self, time_str: str = '') -> datetime: ...
    def relative_time(self, value: Any) -> Any: ...
    def time_since(self, value: Any | datetime, precision: int = 1) -> Any: ...
    def time_until(self, value: Any | datetime, precision: int = 1) -> Any: ...
