Skip to content

Commit

Permalink
Add the blurb
Browse files Browse the repository at this point in the history
  • Loading branch information
zuo committed Sep 30, 2024
1 parent 827db45 commit 91b6bca
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Fix :meth:`datetime.datetime.strptime`, :meth:`datetime.date.strptime` as
well as :func:`time.strptime` (by modifying :class:`_strptime.TimeRE`) to
make ``%c`` and ``%x`` accept year number representations consisting of
fewer digits than the usual four or two. Thanks to that, certain
``strftime/strptime`` round trips (such as
``datetime.strptime(dt.strftime("%c"), "%c"))`` for ``dt.year`` less than
1000) no longer raise ``ValueError`` for some locales/platforms (this was
the case, e.g., on Linux -- for various locales, including
``C``/``C.UTF-8``).

0 comments on commit 91b6bca

Please sign in to comment.