'Parse the string date.
Supported formats:
- YYYY-MM-DD
- YYYY-MM-DD(z|Z)
- YYYY-MM-DD+06:00
- YYYY-MM-DD-06:00
Although, the TZ is ignored because it\'s meaningless
without the time, right?
@param s: A date string.
@type s: str
@return: A date object.
@rtype: I{date}'

def __parse(self, s):

    try:
        (year, month, day) = s[:10].split('-', 2)
        year = int(year)
        month = int(month)
        day = int(day)
        return dt.date(year, month, day)
    except:
        log.debug(s, exec_info=True)
        raise ValueError, ('Invalid    format    "%s"' % s)
