| Server IP : 35.80.110.71 / Your IP : 216.73.216.221 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/dateparser-stubs/ |
Upload File : |
import datetime
from typing_extensions import Literal, TypeAlias, TypedDict
from .date import DateDataParser, _DetectLanguagesFunction
__version__: str
_default_parser: DateDataParser
_Part: TypeAlias = Literal["day", "month", "year"]
_ParserKind: TypeAlias = Literal["timestamp", "relative-time", "custom-formats", "absolute-time", "no-spaces-time"]
class _Settings(TypedDict, total=False):
DATE_ORDER: str
PREFER_LOCALE_DATE_ORDER: bool
TIMEZONE: str
TO_TIMEZONE: str
RETURN_AS_TIMEZONE_AWARE: bool
PREFER_DAY_OF_MONTH: Literal["current", "first", "last"]
PREFER_DATES_FROM: Literal["current_period", "future", "past"]
RELATIVE_BASE: datetime.datetime
STRICT_PARSING: bool
REQUIRE_PARTS: list[_Part]
SKIP_TOKENS: list[str]
NORMALIZE: bool
RETURN_TIME_AS_PERIOD: bool
PARSERS: list[_ParserKind]
def parse(
date_string: str,
date_formats: list[str] | tuple[str, ...] | set[str] | None = None,
languages: list[str] | tuple[str, ...] | set[str] | None = None,
locales: list[str] | tuple[str, ...] | set[str] | None = None,
region: str | None = None,
settings: _Settings | None = None,
detect_languages_function: _DetectLanguagesFunction | None = None,
) -> datetime.datetime | None: ...