Skip to content

Commit 1eb873e

Browse files
[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 73d20ca) Co-authored-by: John Belmonte <[email protected]>
1 parent dee5643 commit 1eb873e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/datetime.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ Available Types
130130
.. class:: timedelta
131131
:noindex:
132132

133-
A duration expressing the difference between two :class:`date`, :class:`.time`,
134-
or :class:`.datetime` instances to microsecond resolution.
133+
A duration expressing the difference between two :class:`.datetime`
134+
or :class:`date` instances to microsecond resolution.
135135

136136

137137
.. class:: tzinfo
@@ -203,7 +203,7 @@ objects.
203203
--------------------------
204204

205205
A :class:`timedelta` object represents a duration, the difference between two
206-
dates or times.
206+
:class:`.datetime` or :class:`date` instances.
207207

208208
.. class:: timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)
209209

0 commit comments

Comments
 (0)