2 from time import struct_time
\r
4 AnyStr, Optional, SupportsAbs, Tuple, Union, overload,
\r
8 if sys.version_info >= (3,):
\r
11 _Text = Union[str, unicode]
\r
17 def tzname(self, dt: Optional[datetime]) -> Optional[str]: ...
\r
18 def utcoffset(self, dt: Optional[datetime]) -> Optional[timedelta]: ...
\r
19 def dst(self, dt: Optional[datetime]) -> Optional[timedelta]: ...
\r
20 def fromutc(self, dt: datetime) -> datetime: ...
\r
22 if sys.version_info >= (3, 2):
\r
23 class timezone(tzinfo):
\r
24 utc: ClassVar[timezone]
\r
25 min: ClassVar[timezone]
\r
26 max: ClassVar[timezone]
\r
28 def __init__(self, offset: timedelta, name: str = ...) -> None: ...
\r
29 def __hash__(self) -> int: ...
\r
36 resolution: ClassVar[timedelta]
\r
38 def __init__(self, year: int, month: int, day: int) -> None: ...
\r
41 def fromtimestamp(cls, t: float) -> date: ...
\r
43 def today(cls) -> date: ...
\r
45 def fromordinal(cls, n: int) -> date: ...
\r
48 def year(self) -> int: ...
\r
50 def month(self) -> int: ...
\r
52 def day(self) -> int: ...
\r
54 def ctime(self) -> str: ...
\r
55 def strftime(self, fmt: _Text) -> str: ...
\r
56 if sys.version_info >= (3,):
\r
57 def __format__(self, fmt: str) -> str: ...
\r
59 def __format__(self, fmt: AnyStr) -> AnyStr: ...
\r
60 def isoformat(self) -> str: ...
\r
61 def timetuple(self) -> struct_time: ...
\r
62 def toordinal(self) -> int: ...
\r
63 def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ...
\r
64 def __le__(self, other: date) -> bool: ...
\r
65 def __lt__(self, other: date) -> bool: ...
\r
66 def __ge__(self, other: date) -> bool: ...
\r
67 def __gt__(self, other: date) -> bool: ...
\r
68 def __add__(self, other: timedelta) -> date: ...
\r
70 def __sub__(self, other: timedelta) -> date: ...
\r
72 def __sub__(self, other: date) -> timedelta: ...
\r
73 def __hash__(self) -> int: ...
\r
74 def weekday(self) -> int: ...
\r
75 def isoweekday(self) -> int: ...
\r
76 def isocalendar(self) -> Tuple[int, int, int]: ...
\r
81 resolution: ClassVar[timedelta]
\r
83 def __init__(self, hour: int = ..., minute: int = ..., second: int = ..., microsecond: int = ...,
\r
84 tzinfo: Optional[tzinfo] = ...) -> None: ...
\r
87 def hour(self) -> int: ...
\r
89 def minute(self) -> int: ...
\r
91 def second(self) -> int: ...
\r
93 def microsecond(self) -> int: ...
\r
95 def tzinfo(self) -> Optional[_tzinfo]: ...
\r
96 if sys.version_info >= (3, 6):
\r
98 def fold(self) -> int: ...
\r
100 def __le__(self, other: time) -> bool: ...
\r
101 def __lt__(self, other: time) -> bool: ...
\r
102 def __ge__(self, other: time) -> bool: ...
\r
103 def __gt__(self, other: time) -> bool: ...
\r
104 def __hash__(self) -> int: ...
\r
105 def isoformat(self) -> str: ...
\r
106 def strftime(self, fmt: _Text) -> str: ...
\r
107 if sys.version_info >= (3,):
\r
108 def __format__(self, fmt: str) -> str: ...
\r
110 def __format__(self, fmt: AnyStr) -> AnyStr: ...
\r
111 def utcoffset(self) -> Optional[timedelta]: ...
\r
112 def tzname(self) -> Optional[str]: ...
\r
113 def dst(self) -> Optional[int]: ...
\r
114 if sys.version_info >= (3, 6):
\r
115 def replace(self, hour: int = ..., minute: int = ..., second: int = ...,
\r
116 microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...,
\r
117 *, fold: int = ...) -> time: ...
\r
119 def replace(self, hour: int = ..., minute: int = ..., second: int = ...,
\r
120 microsecond: int = ..., tzinfo: Optional[_tzinfo] = ...) -> time: ...
\r
125 class timedelta(SupportsAbs[timedelta]):
\r
126 min: ClassVar[timedelta]
\r
127 max: ClassVar[timedelta]
\r
128 resolution: ClassVar[timedelta]
\r
130 def __init__(self, days: float = ..., seconds: float = ..., microseconds: float = ...,
\r
131 milliseconds: float = ..., minutes: float = ..., hours: float = ...,
\r
132 weeks: float = ...) -> None: ...
\r
135 def days(self) -> int: ...
\r
137 def seconds(self) -> int: ...
\r
139 def microseconds(self) -> int: ...
\r
141 def total_seconds(self) -> float: ...
\r
142 def __add__(self, other: timedelta) -> timedelta: ...
\r
143 def __radd__(self, other: timedelta) -> timedelta: ...
\r
144 def __sub__(self, other: timedelta) -> timedelta: ...
\r
145 def __rsub__(self, other: timedelta) -> timedelta: ...
\r
146 def __neg__(self) -> timedelta: ...
\r
147 def __pos__(self) -> timedelta: ...
\r
148 def __abs__(self) -> timedelta: ...
\r
149 def __mul__(self, other: float) -> timedelta: ...
\r
150 def __rmul__(self, other: float) -> timedelta: ...
\r
152 def __floordiv__(self, other: timedelta) -> int: ...
\r
154 def __floordiv__(self, other: int) -> timedelta: ...
\r
155 if sys.version_info >= (3,):
\r
157 def __truediv__(self, other: timedelta) -> float: ...
\r
159 def __truediv__(self, other: float) -> timedelta: ...
\r
160 def __mod__(self, other: timedelta) -> timedelta: ...
\r
161 def __divmod__(self, other: timedelta) -> Tuple[int, timedelta]: ...
\r
164 def __div__(self, other: timedelta) -> float: ...
\r
166 def __div__(self, other: float) -> timedelta: ...
\r
167 def __le__(self, other: timedelta) -> bool: ...
\r
168 def __lt__(self, other: timedelta) -> bool: ...
\r
169 def __ge__(self, other: timedelta) -> bool: ...
\r
170 def __gt__(self, other: timedelta) -> bool: ...
\r
171 def __hash__(self) -> int: ...
\r
174 # TODO: Is a subclass of date, but this would make some types incompatible.
\r
175 min: ClassVar[datetime]
\r
176 max: ClassVar[datetime]
\r
177 resolution: ClassVar[timedelta]
\r
179 if sys.version_info >= (3, 6):
\r
180 def __init__(self, year: int, month: int, day: int, hour: int = ...,
\r
181 minute: int = ..., second: int = ..., microsecond: int = ...,
\r
182 tzinfo: Optional[tzinfo] = ..., *, fold: int = ...) -> None: ...
\r
184 def __init__(self, year: int, month: int, day: int, hour: int = ...,
\r
185 minute: int = ..., second: int = ..., microsecond: int = ...,
\r
186 tzinfo: Optional[tzinfo] = ...) -> None: ...
\r
189 def year(self) -> int: ...
\r
191 def month(self) -> int: ...
\r
193 def day(self) -> int: ...
\r
195 def hour(self) -> int: ...
\r
197 def minute(self) -> int: ...
\r
199 def second(self) -> int: ...
\r
201 def microsecond(self) -> int: ...
\r
203 def tzinfo(self) -> Optional[_tzinfo]: ...
\r
204 if sys.version_info >= (3, 6):
\r
206 def fold(self) -> int: ...
\r
209 def fromtimestamp(cls, t: float, tz: Optional[_tzinfo] = ...) -> datetime: ...
\r
211 def utcfromtimestamp(cls, t: float) -> datetime: ...
\r
213 def today(cls) -> datetime: ...
\r
215 def fromordinal(cls, n: int) -> datetime: ...
\r
217 def now(cls, tz: Optional[_tzinfo] = ...) -> datetime: ...
\r
219 def utcnow(cls) -> datetime: ...
\r
220 if sys.version_info >= (3, 6):
\r
222 def combine(cls, date: date, time: time, tzinfo: Optional[_tzinfo] = ...) -> datetime: ...
\r
225 def combine(cls, date: date, time: time) -> datetime: ...
\r
226 if sys.version_info >= (3, 7):
\r
228 def fromisoformat(cls, date_string: str) -> datetime: ...
\r
229 def strftime(self, fmt: _Text) -> str: ...
\r
230 if sys.version_info >= (3,):
\r
231 def __format__(self, fmt: str) -> str: ...
\r
233 def __format__(self, fmt: AnyStr) -> AnyStr: ...
\r
234 def toordinal(self) -> int: ...
\r
235 def timetuple(self) -> struct_time: ...
\r
236 if sys.version_info >= (3, 3):
\r
237 def timestamp(self) -> float: ...
\r
238 def utctimetuple(self) -> struct_time: ...
\r
239 def date(self) -> _date: ...
\r
240 def time(self) -> _time: ...
\r
241 def timetz(self) -> _time: ...
\r
242 if sys.version_info >= (3, 6):
\r
243 def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,
\r
244 minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:
\r
245 Optional[_tzinfo] = ..., *, fold: int = ...) -> datetime: ...
\r
247 def replace(self, year: int = ..., month: int = ..., day: int = ..., hour: int = ...,
\r
248 minute: int = ..., second: int = ..., microsecond: int = ..., tzinfo:
\r
249 Optional[_tzinfo] = ...) -> datetime: ...
\r
250 if sys.version_info >= (3, 3):
\r
251 def astimezone(self, tz: Optional[_tzinfo] = ...) -> datetime: ...
\r
253 def astimezone(self, tz: _tzinfo) -> datetime: ...
\r
254 def ctime(self) -> str: ...
\r
255 if sys.version_info >= (3, 6):
\r
256 def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...
\r
258 def isoformat(self, sep: str = ...) -> str: ...
\r
260 def strptime(cls, date_string: _Text, format: _Text) -> datetime: ...
\r
261 def utcoffset(self) -> Optional[timedelta]: ...
\r
262 def tzname(self) -> Optional[str]: ...
\r
263 def dst(self) -> Optional[int]: ...
\r
264 def __le__(self, other: datetime) -> bool: ...
\r
265 def __lt__(self, other: datetime) -> bool: ...
\r
266 def __ge__(self, other: datetime) -> bool: ...
\r
267 def __gt__(self, other: datetime) -> bool: ...
\r
268 def __add__(self, other: timedelta) -> datetime: ...
\r
270 def __sub__(self, other: datetime) -> timedelta: ...
\r
272 def __sub__(self, other: timedelta) -> datetime: ...
\r
273 def __hash__(self) -> int: ...
\r
274 def weekday(self) -> int: ...
\r
275 def isoweekday(self) -> int: ...
\r
276 def isocalendar(self) -> Tuple[int, int, int]: ...
\r