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

2020-09-28 Thread Red Rooster
Red Rooster added the comment: The issue is not that the date is before 1900, the issue are german month names. That strptime understands them, first set the locale like that: locale.setlocale(locale.LC_TIME, "de_DE") -- resolution: -> not a bug stage: -> resolved status: open -> cl

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

2020-09-28 Thread Red Rooster
New submission from Red Rooster : 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