When I use dateutil.parser
to parse an incomplete date that's missing the day, I get the day set to 10
for some reason:
from dateutil.parser import parse
>>> d1 = parse('2008 Apr 2')
>>> d1
datetime.datetime(2008, 4, 2, 0, 0)
>>> d2 = parse('2014 Apr')
>>> d2
datetime.datetime(2014, 4, 10, 0, 0)
Is there a way to changing this so that the day gets automatically set to 1
instead for such incomplete cases?