The python dateutils package allows to parse date(time)s without specifying a format. It attempts to always return a date, even when the input does not appear to be one (e.g. 12). What would be a pythonic way to ensure at least a day, month and year component to be present in the input?
from dateutil import parser
dstr = '12'
dtime = parser.parse(dstr)
Returns
2019-06-12 00:00:00