Skip to content

Commit

Permalink
Docs edit
Browse files Browse the repository at this point in the history
  • Loading branch information
zuo committed Oct 1, 2024
1 parent 1956662 commit a77c3da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2639,11 +2639,11 @@ Notes:
or ``%x`` format code, no longer requires the *year* part of the
input to be zero-padded to the usual width (which is either 4 or
2 digits, depending on the format code and current locale). In
previous versions, a :exc:`ValueError` was raised if a shorter
*year* (not zero-padded to the 2- or 4-digit width as appropriate)
was part of the input. It is worth noting that, depending on the
platform/locale, such inputs may be produced by using
:meth:`~.datetime.strftime` with ``%c`` or ``%x``).
previous versions, a :exc:`ValueError` was raised if a narrower
(i.e., not zero-padded) year representation was part of the input
(and it is worth noting that, depending on the platform/locale,
such inputs may be produced by using :meth:`~.datetime.strftime`
with ``%c`` or ``%x``).

(2)
The :meth:`~.datetime.strptime` method can parse years in the full [1, 9999] range, but
Expand Down

0 comments on commit a77c3da

Please sign in to comment.