'This will take a string and do it\'s best to return a Date object
It will try the following in order
* Convert using the ISO format:
* look for a month in words a 4 digit year and a day (1 or 2 digits)
* a year and month that matches the date now and NOT a future date
* a year that matches the current date and the previous month'

def formattedAnswer(self, data):

    rawDate = data
    date = None
    try:
        isoDate = ''
        addHyphen = False
        for char in rawDate:
            if char.isdigit:
                if ((addHyphen == True) and (isoDate != '')):
                    isoDate += '-'
                isoDate += char
                addHyphen = False
            else:
                addHyphen = True
        date = datetime.strptime(rawDate, '%Y-%m-%d')
        return date
    except ValueError:
        try:
            for month in monthList:
                if (month in rawDate):
                    search = (re, search('\\D\\d\\d\\D', rawDate))
                    if search:
                        day = search.group()
                    else:
                        search = (re, search('^\\d\\d\\D', rawDate))
                        if search:
                            day = search.group()
                        else:
                            search = (re, search('\\D\\d\\d$', rawDate))
                            if search:
                                day = search.group()
                            else:
                                search = (re, search('\\D\\d\\D', rawDate))
                                if search:
                                    day = ('0' + search.group())
                                else:
                                    search = (re, search('^\\d\\D', rawDate))
                                    if search:
                                        day = ('0' + search.group())
                                    else:
                                        search = (re, search('\\D\\d$', rawDate))
                                        if search:
                                            day = ('0' + search.group())
                                        else:
                                            raise ValueError
                    search = (re, search('\\D\\d\\d\\d\\d\\D', rawDate))
                    if search:
                        year = search.group()
                    else:
                        search = (re, search('^\\d\\d\\d\\d\\D', rawDate))
                        if search:
                            year = search.group()
                        else:
                            search = (re, search('\\D\\d\\d\\d\\d$', rawDate))
                            if search:
                                year = search.group()
                            else:
                                raise ValueError
                testDate = ('%s-%s-%s' % (day, month, year))
                if (len(month) == 3):
                    (format == '%d-%b-%Y')
                else:
                    (format == '%d-%B-%Y')
                date = datetime.strptime(format, testDate)
                return date
        except ValueError:
            return date
