matplotlib/matplotlib — pull request #2481 by mdboom (2013-10-01 14:19:21+00:00)
Title: datestr2num of year and month fails on 29th, 30th, and 31st of month

datestr2num by default uses the current day if year-month data is converted.
This means that on the 29th, 30th or 31st of any month, datestr2num cannot be used to convert February, and on the 31st of any month, a number of other months cannot be converted.
For example, on September 30 I cannot convert monthly data, as February doesn't have 30 days. Conversion of:
datestr2num('2000-02')
Gives an error:
ValueError: day is out of range for month

datestr2num calls dateutil.parser.parse, which by default uses the
current date at 00:00:00 for missing fields. The dateutil function
also can use a "default" argument to change this bahavoir but it is
not available in datestr2num. datestr2num needs a keyword argument to change the day that is used when it is not supplied.