Treeve,
Thanks for the patch.
I'm guessing a bit because I want to commit this improvement rather than
get it in infinite delay by being a detail freak, but I think this
should have some attention in doc-tests. On one hand, I think that
>>> parse_date(x.strftime("%x"))==x
True
will actually pass now when running in a European locale.
On the other hand, I think that
>>> DateParser().str_to_date_int("12 1 2020")
(2020, 12, 1)
will fail now when running in a European locale.
I'm taking your patch as given since I think that doc-tests fail (albeit
differently) with or with-out this change and might make a poke at
extending it sometime later to make it actually pass doc-tests in
Europe. I think the doc-tests will require embedding a state member
variable in the DateParser object similar to the 'today' member. I
added the 'today' explicitly so I could have doc-tests passing
regardless of date.
Thanks
Joel