Skip to content
Open
Changes from all 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
8 changes: 8 additions & 0 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,14 @@ Notes:
:exc:`DeprecationWarning`. In 3.15 or later we may change this into
an error or change the default year to a leap year. See :gh:`70647`.

(11)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a note here the best place for this?

This comment was marked as resolved.

When parsing a string using :meth:`~.datetime.strptime`, if more than one
directives of the same time unit were used, only the last directive gets parsed
and applied to the datetime object. For example, if the format string contains
both ``%Y`` and ``%y``, like ``%Y%y``, only the last directive on the string (``%y``)
gets used on the resulting datetime object.


.. rubric:: Footnotes

.. [#] If, that is, we ignore the effects of Relativity
Expand Down
Loading