summaryrefslogtreecommitdiffstats
path: root/Doc/library/datetime.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-02-02 21:48:44 (GMT)
committerGitHub <noreply@github.com>2024-02-02 21:48:44 (GMT)
commit1eb873ef458521648f043ddfebe41b24d0cfd87d (patch)
tree98d290e1e6199613ea31e2cbb585c9e60a22d00b /Doc/library/datetime.rst
parentdee56434b56e397be0f06fa13a3834a41bcd3fb3 (diff)
downloadcpython-1eb873ef458521648f043ddfebe41b24d0cfd87d.zip
cpython-1eb873ef458521648f043ddfebe41b24d0cfd87d.tar.gz
cpython-1eb873ef458521648f043ddfebe41b24d0cfd87d.tar.bz2
[3.12] Correct timedelta description (GH-101417) (GH-114938)
It only represents the difference between two datetime or date objects, not between two time objects. (cherry picked from commit 73d20cafb54193c94577ca60df1ba0410b3ced74) Co-authored-by: John Belmonte <john@neggie.net>
Diffstat (limited to 'Doc/library/datetime.rst')
-rw-r--r--Doc/library/datetime.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 3363eb8..daf023f 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -130,8 +130,8 @@ Available Types
.. class:: timedelta
:noindex:
- A duration expressing the difference between two :class:`date`, :class:`.time`,
- or :class:`.datetime` instances to microsecond resolution.
+ A duration expressing the difference between two :class:`.datetime`
+ or :class:`date` instances to microsecond resolution.
.. class:: tzinfo
@@ -203,7 +203,7 @@ objects.
--------------------------
A :class:`timedelta` object represents a duration, the difference between two
-dates or times.
+:class:`.datetime` or :class:`date` instances.
.. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)