[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-03 Thread Nick Moore
Nick Moore added the comment: It's kind of funny that there's already consideration of this in _strptime._strptime(), which returns a tuple used by datetime.datetime.strptime() to construct the new datetime. Search for `leap_year_fix`. I think the concern though is if we changed t

[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-02 Thread Nick Moore
Nick Moore added the comment: Not disagreeing with you that "%b %d" timestamps with no "%Y" are excerable, but they're fairly common in the *nix world unfortunately. People need to parse them, and the simple and obvious way to do this breaks every four years. I

[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-01 Thread Nick Moore
Nick Moore added the comment: I suspect this is going to come up about this time of every leap year :-/ The workaround is prepending "%Y " to the pattern and eg: "2020 " to the date string, but that's not very nice. Would adding a kwarg "default_year"