I use dateutil.parser.parse
function to convert something like 01.01
or 12.31
to datetime where year is a current year. So 01.01
becomes 01.01.2019
. This code however does not work:
from dateutil import parser.parse
date = '05.05'
print(parser.parse(date))
Result:
>>> datetime.datetime(2019, 3, 5, 0, 0)
What am I doing wrong?