I am getting a very strange bug in python.
from dateutil import parser
string = "March 2008"
parser.parse(string)
datetime.datetime(2008, 3, 30, 0, 0)
string = "February 2008"
parser.parse(string)
Traceback (most recent call last):
File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 697, in parse return DEFAULTPARSER.parse(timestr, **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py", line 310, in parse ret = default.replace(**repl) ValueError: day is out of range for month
I understand that I can add a day to my string to make the parser work, but I have no idea why dateutil does not work without the day for February, while it works for every other month.