Return a datetime object, by parsing a string date/time

    With strict=False, dateString may be None or '', otherwise it must be a
    parseable string

def parseDate(dateString, strict=True):
    """
    Return a datetime object, by parsing a string date/time

    With strict=False, dateString may be None or '', otherwise it must be a
    parseable string
    """
    if (not strict) and (not dateString):
        return None

    if not isinstance(dateString, basestring):
        raise TypeError('%r is not a string' % dateString)

    return parser.parse(dateString)