'Parses :data: for a date identifier.
If found, returns the date and regexp match object
If no date is found returns False'

def parse_date(self, data):

    for date_re in self.date_regexps:
        match = re.search(date_re, data)
        if match:
            possdates = []
            try:
                dayfirst_opts = [True, False]
                if (self.date_dayfirst is not None):
                    dayfirst_opts = [self.date_dayfirst]
                yearfirst_opts = [True, False]
                if (self.date_yearfirst is not None):
                    yearfirst_opts = [self.date_yearfirst]
                kwargs_list = ({u'dayfirst': d, u'yearfirst': y} for d in dayfirst_opts for y in yearfirst_opts)
                for kwargs in kwargs_list:
                    possdate = parsedate(u'    '.join(match.groups()), **kwargs)
                    if (possdate > (datetime.now() + timedelta(days=1))):
                        continue
                    if (possdate < datetime(1970, 1, 1)):
                        continue
                    if (possdate not in possdates):
                        possdates.append(possdate)
            except ValueError:
                log.debug(u'%s    is    not    a    valid    date,    skipping', match.group(0))
                continue
            if (not possdates):
                log.debug(u'All    possible    dates    for    %s    were    in    the    future', match.group(0))
                continue
            possdates.sort()
            bestdate = possdates[(-1)]
            return {u'date': bestdate, u'match': match}
    return False
