]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Correct timedelta description (GH-101417) (GH-114938)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 2 Feb 2024 21:48:44 +0000 (22:48 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Feb 2024 21:48:44 +0000 (21:48 +0000)
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>
Doc/library/datetime.rst

index 3363eb85ac7008f3991f6fba742c8a860f907f49..daf023f3205f9cce8b0ce569d09c9de12a891917 100644 (file)
@@ -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)