Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8840921

Browse filesBrowse files
committed
Revert some changes to focus only on backquotes
1 parent b4d5661 commit 8840921
Copy full SHA for 8840921

File tree

1 file changed

+15
-21
lines changed
Filter options

1 file changed

+15
-21
lines changed

‎Doc/library/datetime.rst

Copy file name to clipboardExpand all lines: Doc/library/datetime.rst
+15-21Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ A :class:`timedelta` object represents a duration, the difference between two
213213
Only *days*, *seconds* and *microseconds* are stored internally.
214214
Arguments are converted to those units:
215215

216-
* A *millisecond* is converted to 1000 *microseconds*.
217-
* A *minute* is converted to 60 *seconds*.
218-
* An *hour* is converted to 3600 *seconds*.
219-
* A *week* is converted to 7 *days*.
216+
* A millisecond is converted to 1000 microseconds.
217+
* A minute is converted to 60 seconds.
218+
* An hour is converted to 3600 seconds.
219+
* A week is converted to 7 days.
220220

221221
and days, seconds and microseconds are then normalized so that the
222222
representation is unique, with
@@ -285,21 +285,15 @@ Note that, because of normalization, ``timedelta.max > -timedelta.min`` is true.
285285

286286
Instance attributes (read-only):
287287

288-
289-
.. attribute:: timedelta.days
290-
291-
Between ``-999999999`` and ``999999999`` inclusive.
292-
293-
294-
.. attribute:: timedelta.seconds
295-
296-
Between ``0`` and ``86399`` inclusive.
297-
298-
299-
.. attribute:: timedelta.microseconds
300-
301-
Between ``0`` and ``999999`` inclusive.
302-
288+
+------------------+--------------------------------------------+
289+
| Attribute | Value |
290+
+==================+============================================+
291+
| ``days`` | Between -999999999 and 999999999 inclusive |
292+
+------------------+--------------------------------------------+
293+
| ``seconds`` | Between 0 and 86399 inclusive |
294+
+------------------+--------------------------------------------+
295+
| ``microseconds`` | Between 0 and 999999 inclusive |
296+
+------------------+--------------------------------------------+
303297

304298
Supported operations:
305299

@@ -375,7 +369,7 @@ Notes:
375369
This is exact and cannot overflow.
376370

377371
(3)
378-
Division by ``0`` raises :exc:`ZeroDivisionError`.
372+
Division by zero raises :exc:`ZeroDivisionError`.
379373

380374
(4)
381375
``-timedelta.max`` is not representable as a :class:`timedelta` object.
@@ -1221,7 +1215,7 @@ Supported operations:
12211215
object *t* such that ``datetime2 + t == datetime1``. No time zone adjustments
12221216
are done in this case.
12231217

1224-
If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a - b`` acts
1218+
If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a-b`` acts
12251219
as if *a* and *b* were first converted to naive UTC datetimes. The
12261220
result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b.replace(tzinfo=None)
12271221
- b.utcoffset())`` except that the implementation never overflows.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.