Skip to content

datetime.rst: improve combine() docs #101338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 26, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,10 @@ Other constructors, all class methods:
is used.

For any :class:`.datetime` object *d*,
``d == datetime.combine(d.date(), d.time(), d.tzinfo)``. If date is a
:class:`.datetime` object, its time components and :attr:`.tzinfo` attributes
are ignored.
``d == datetime.combine(d.date(), d.time(), d.tzinfo)``.

If the *date* argument is a :class:`.datetime` object, its time components and
:attr:`.tzinfo` attributes are ignored.

.. versionchanged:: 3.6
Added the *tzinfo* argument.
Expand Down