Skip to content

Commit 91b6bca

Browse files
committed
Add the blurb
1 parent 827db45 commit 91b6bca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Fix :meth:`datetime.datetime.strptime`, :meth:`datetime.date.strptime` as
2+
well as :func:`time.strptime` (by modifying :class:`_strptime.TimeRE`) to
3+
make ``%c`` and ``%x`` accept year number representations consisting of
4+
fewer digits than the usual four or two. Thanks to that, certain
5+
``strftime/strptime`` round trips (such as
6+
``datetime.strptime(dt.strftime("%c"), "%c"))`` for ``dt.year`` less than
7+
1000) no longer raise ``ValueError`` for some locales/platforms (this was
8+
the case, e.g., on Linux -- for various locales, including
9+
``C``/``C.UTF-8``).

0 commit comments

Comments
 (0)