--- /dev/null
+import sys\r
+from time import struct_time\r
+from typing import (\r
+ AnyStr, Optional, SupportsAbs, Tuple, Union, overload,\r
+ ClassVar,\r
+)\r
+\r
+if sys.version_info >= (3,):\r
+ _Text = str\r
+else:\r
+ _Text = Union[str, unicode]\r
+\r
+MINYEAR: int\r
+MAXYEAR: int\r
+\r
+class tzinfo:\r
+ def tzname(self, dt: Optional[datetime]) -> Optional[str]: ...\r
+ def utcoffset(self, dt: Optional[datetime]) -> Optional[timedelta]: ...\r
+ def dst(self, dt: Optional[datetime]) -> Optional[timedelta]: ...\r
+ def fromutc(self, dt: datetime) -> datetime: ...\r
+\r
+if sys.version_info >= (3, 2):\r
+ class timezone(tzinfo):\r
+ utc: ClassVar[timezone]\r
+ min: ClassVar[timezone]\r
+ max: ClassVar[timezone]\r
+\r
+ def __init__(self, offset: timedelta, name: str = ...) -> None: ...\r
+ def __hash__(self) -> int: ...\r
+\r
+_tzinfo = tzinfo\r
+\r
+class date:\r
+ min: ClassVar[date]\r
+ max: ClassVar[date]\r
+ resolution: ClassVar[timedelta]\r
+\r
+ def __init__(self, year: int, month: int, day: int) -> None: ...\r
+\r
+ @classmethod\r
+ def fromtimestamp(cls, t: float) -> date: ...\r
+ @classmethod\r
+ def today(cls) -> date: ...\r
+ @classmethod\r
+ def fromordinal(cls, n: int) -> date: ...\r
+\r
+ @property\r
+ def year(self) -> int: ...\r
+ @property\r
+ def month(self) -> int: ...\r
+ @property\r
+ def day(self) -> int: ...\r
+\r
+ def ctime(self) -> str: ...\r
+ def strftime(self, fmt: _Text) -> str: ...\r
+ if sys.version_info >= (3,):\r
+ def __format__(self, fmt: str) -> str: ...\r
+ else:\r
+ def __format__(self, fmt: AnyStr) -> AnyStr: ...\r
+ def isoformat(self) -> str: ...\r
+ def timetuple(self) -> struct_time: ...\r
+ def toordinal(self) -> int: ...\r
+ def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ...\r
+ def __le__(self, other: date) -> bool: ...\r
+ def __lt__(self, other: date) -> bool: ...\r
+ def __ge__(self, other: date) -> bool: ...\r
+ def __gt__(self, other: date) -> bool: ...\r
+ def __add__(self, other: timedelta) -> date: ...\r
+ @overload\r
+ def __sub__(self, other: timedelta) -> date: ...\r
+ @overload\r
+ def __sub__(self, other: date) -> timedelta: ...\r
+ def __hash__(self) -> int: ...\r
+ def weekday(self) -> int: ...\r
+ def isoweekday(self) -> int: ...\r
+ def isocalendar(self) -> Tuple[int, int, int]: ...\r
+\r
+class time:\r
+ min: ClassVar[time]\r
+ max: ClassVar[time]\r
+ resolution: ClassVar[timedelta]\r
+\r
+ def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,\r
+ tzinfo: Optional[tzinfo] = ...) -> None: ...\r
+\r
+ @property\r
+ def hour(self) -> int: ...\r
+ @property\r
+ def minute(self) -> int: ...\r
+ @property\r
+ def second(self) -> int: ...\r
+ @property\r
+ def microsecond(self) -> int: ...\r
+ @property\r
+ def tzinfo(self) -> Optional[_tzinfo]: ...\r
+ if sys.version_info >= (3, 6):\r
+ @property\r
+ def fold(self) -> int: ...\r
+\r
+ def __le__(self, other: time) -> bool: ...\r
+ def __lt__(self, other: time) -> bool: ...\r
+ def __ge__(self, other: time) -> bool: ...\r
+ def __gt__(self, other: time) -> bool: ...\r
+ def __hash__(self) -> int: ...\r
+ def isoformat(self) -> str: ...\r
+ def strftime(self, fmt: _Text) -> str: ...\r
+ if sys.version_info >= (3,):\r
+ def __format__(self, fmt: str) -> str: ...\r
+ else:\r
+ def __format__(self, fmt: AnyStr) -> AnyStr: ...\r
+ def utcoffset(self) -> Optional[timedelta]: ...\r
+ def tzname(self) -> Optional[str]: ...\r
+ def dst(self) -> Optional[int]: ...\r
+ if sys.version_info >= (3, 6):\r
+ def replace(self, hour: int = ..., minute: int = ..., second: int = ...,\r
+ microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...,\r
+ *, fold: int = ...) -> time: ...\r
+ else:\r
+ def replace(self, hour: int = ..., minute: int = ..., second: int = ...,\r
+ microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> time: ...\r
+\r
+_date = date\r
+_time = time\r
+\r
+class timedelta(SupportsAbs[timedelta]):\r
+ min: ClassVar[timedelta]\r
+ max: ClassVar[timedelta]\r
+ resolution: ClassVar[timedelta]\r
+\r
+ def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ...,\r
+ milliseconds: float = ..., minutes: float = ..., hours: float = ...,\r
+ weeks: float = ...) -> None: ...\r
+\r
+ @property\r
+ def days(self) -> int: ...\r
+ @property\r
+ def seconds(self) -> int: ...\r
+ @property\r
+ def microseconds(self) -> int: ...\r
+\r
+ def total_seconds(self) -> float: ...\r
+ def __add__(self, other: timedelta) -> timedelta: ...\r
+ def __radd__(self, other: timedelta) -> timedelta: ...\r
+ def __sub__(self, other: timedelta) -> timedelta: ...\r
+ def __rsub__(self, other: timedelta) -> timedelta: ...\r
+ def __neg__(self) -> timedelta: ...\r
+ def __pos__(self) -> timedelta: ...\r
+ def __abs__(self) -> timedelta: ...\r
+ def __mul__(self, other: float) -> timedelta: ...\r
+ def __rmul__(self, other: float) -> timedelta: ...\r
+ @overload\r
+ def __floordiv__(self, other: timedelta) -> int: ...\r
+ @overload\r
+ def __floordiv__(self, other: int) -> timedelta: ...\r
+ if sys.version_info >= (3,):\r
+ @overload\r
+ def __truediv__(self, other: timedelta) -> float: ...\r
+ @overload\r
+ def __truediv__(self, other: float) -> timedelta: ...\r
+ def __mod__(self, other: timedelta) -> timedelta: ...\r
+ def __divmod__(self, other: timedelta) -> Tuple[int, timedelta]: ...\r
+ else:\r
+ @overload\r
+ def __div__(self, other: timedelta) -> float: ...\r
+ @overload\r
+ def __div__(self, other: float) -> timedelta: ...\r
+ def __le__(self, other: timedelta) -> bool: ...\r
+ def __lt__(self, other: timedelta) -> bool: ...\r
+ def __ge__(self, other: timedelta) -> bool: ...\r
+ def __gt__(self, other: timedelta) -> bool: ...\r
+ def __hash__(self) -> int: ...\r
+\r
+class datetime:\r
+ # TODO: Is a subclass of date, but this would make some types incompatible.\r
+ min: ClassVar[datetime]\r
+ max: ClassVar[datetime]\r
+ resolution: ClassVar[timedelta]\r
+\r
+ if sys.version_info >= (3, 6):\r
+ def __init__(self, year: int, month: int, day: int, hour: int = ...,\r
+ minute: int = ..., second: int = ..., microsecond: int = ...,\r
+ tzinfo: Optional[tzinfo] = ..., *, fold: int = ...) -> None: ...\r
+ else:\r
+ def __init__(self, year: int, month: int, day: int, hour: int = ...,\r
+ minute: int = ..., second: int = ..., microsecond: int = ...,\r
+ tzinfo: Optional[tzinfo] = ...) -> None: ...\r
+\r
+ @property\r
+ def year(self) -> int: ...\r
+ @property\r
+ def month(self) -> int: ...\r
+ @property\r
+ def day(self) -> int: ...\r
+ @property\r
+ def hour(self) -> int: ...\r
+ @property\r
+ def minute(self) -> int: ...\r
+ @property\r
+ def second(self) -> int: ...\r
+ @property\r
+ def microsecond(self) -> int: ...\r
+ @property\r
+ def tzinfo(self) -> Optional[_tzinfo]: ...\r
+ if sys.version_info >= (3, 6):\r
+ @property\r
+ def fold(self) -> int: ...\r
+\r
+ @classmethod\r
+ def fromtimestamp(cls, t: float, tz: Optional[_tzinfo] = ...) -> datetime: ...\r
+ @classmethod\r
+ def utcfromtimestamp(cls, t: float) -> datetime: ...\r
+ @classmethod\r
+ def today(cls) -> datetime: ...\r
+ @classmethod\r
+ def fromordinal(cls, n: int) -> datetime: ...\r
+ @classmethod\r
+ def now(cls, tz: Optional[_tzinfo] = ...) -> datetime: ...\r
+ @classmethod\r
+ def utcnow(cls) -> datetime: ...\r
+ if sys.version_info >= (3, 6):\r
+ @classmethod\r
+ def combine(cls, date: date, time: time, tzinfo: Optional[_tzinfo] = ...) -> datetime: ...\r
+ else:\r
+ @classmethod\r
+ def combine(cls, date: date, time: time) -> datetime: ...\r
+ if sys.version_info >= (3, 7):\r
+ @classmethod\r
+ def fromisoformat(cls, date_string: str) -> datetime: ...\r
+ def strftime(self, fmt: _Text) -> str: ...\r
+ if sys.version_info >= (3,):\r
+ def __format__(self, fmt: str) -> str: ...\r
+ else:\r
+ def __format__(self, fmt: AnyStr) -> AnyStr: ...\r
+ def toordinal(self) -> int: ...\r
+ def timetuple(self) -> struct_time: ...\r
+ if sys.version_info >= (3, 3):\r
+ def timestamp(self) -> float: ...\r
+ def utctimetuple(self) -> struct_time: ...\r
+ def date(self) -> _date: ...\r
+ def time(self) -> _time: ...\r
+ def timetz(self) -> _time: ...\r
+ if sys.version_info >= (3, 6):\r
+ def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,\r
+ minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:\r
+ Optional[_tzinfo] = ..., *, fold: int = ...) -> datetime: ...\r
+ else:\r
+ def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,\r
+ minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:\r
+ Optional[_tzinfo] = ...) -> datetime: ...\r
+ if sys.version_info >= (3, 3):\r
+ def astimezone(self, tz: Optional[_tzinfo] = ...) -> datetime: ...\r
+ else:\r
+ def astimezone(self, tz: _tzinfo) -> datetime: ...\r
+ def ctime(self) -> str: ...\r
+ if sys.version_info >= (3, 6):\r
+ def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...\r
+ else:\r
+ def isoformat(self, sep: str = ...) -> str: ...\r
+ @classmethod\r
+ def strptime(cls, date_string: _Text, format: _Text) -> datetime: ...\r
+ def utcoffset(self) -> Optional[timedelta]: ...\r
+ def tzname(self) -> Optional[str]: ...\r
+ def dst(self) -> Optional[int]: ...\r
+ def __le__(self, other: datetime) -> bool: ...\r
+ def __lt__(self, other: datetime) -> bool: ...\r
+ def __ge__(self, other: datetime) -> bool: ...\r
+ def __gt__(self, other: datetime) -> bool: ...\r
+ def __add__(self, other: timedelta) -> datetime: ...\r
+ @overload\r
+ def __sub__(self, other: datetime) -> timedelta: ...\r
+ @overload\r
+ def __sub__(self, other: timedelta) -> datetime: ...\r
+ def __hash__(self) -> int: ...\r
+ def weekday(self) -> int: ...\r
+ def isoweekday(self) -> int: ...\r
+ def isocalendar(self) -> Tuple[int, int, int]: ...\r