mirror of
https://github.com/python/cpython.git
synced 2025-10-05 06:31:48 +00:00
Improve documentation for adding datetime and timedelta (gh-95403) (gh-95408)
(cherry picked from commit 6e44bf9558
)
Co-authored-by: BenjaminHelyer <91896754+BenjaminHelyer@users.noreply.github.com>
Co-authored-by: BenjaminHelyer <91896754+BenjaminHelyer@users.noreply.github.com>
This commit is contained in:
parent
309c8f316d
commit
3e9a496b6b
1 changed files with 2 additions and 2 deletions
|
@ -589,8 +589,8 @@ Supported operations:
|
||||||
+-------------------------------+----------------------------------------------+
|
+-------------------------------+----------------------------------------------+
|
||||||
| Operation | Result |
|
| Operation | Result |
|
||||||
+===============================+==============================================+
|
+===============================+==============================================+
|
||||||
| ``date2 = date1 + timedelta`` | *date2* is ``timedelta.days`` days removed |
|
| ``date2 = date1 + timedelta`` | *date2* will be ``timedelta.days`` days |
|
||||||
| | from *date1*. (1) |
|
| | after *date1*. (1) |
|
||||||
+-------------------------------+----------------------------------------------+
|
+-------------------------------+----------------------------------------------+
|
||||||
| ``date2 = date1 - timedelta`` | Computes *date2* such that ``date2 + |
|
| ``date2 = date1 - timedelta`` | Computes *date2* such that ``date2 + |
|
||||||
| | timedelta == date1``. (2) |
|
| | timedelta == date1``. (2) |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue