[issue41874] datetime.strptime raises error if date is before 1900

Red Rooster report at bugs.python.org
Mon Sep 28 06:55:46 EDT 2020


New submission from Red Rooster <mark.muzenhardt at 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 <report at bugs.python.org>
<https://bugs.python.org/issue41874>
_______________________________________


More information about the Python-bugs-list mailing list