New submission from Red Rooster <mark.muzenha...@googlemail.com>:

This fails, because the date is before 1900:
d = datetime.strptime("28. Februar 1899", '%d. %B %Y')

But the opposite conversion direction works:
d=datetime(1899,2,28)
d.strftime('%d. %B %Y')

prints out "28. Februar 1899" as it should be.

----------
components: Library (Lib)
messages: 377592
nosy: redrooster
priority: normal
severity: normal
status: open
title: datetime.strptime raises error if date is before 1900
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41874>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to