Skip to content

Commit

Permalink
Correct timedelta description (GH-101417)
Browse files Browse the repository at this point in the history
It only represents the difference between two datetime or
date objects, not between two time objects.
  • Loading branch information
belm0 authored Feb 2, 2024
1 parent b27812d commit 73d20ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 73d20ca

Please sign in to comment.