'Convert into datetime.date'

@classmethod
def _date(cls, b):

    if isinstance(b, datetime.date):
        return b
    elif isinstance(b, basestring):
        from s3validators import IS_UTC_DATE
        (value, error) = IS_UTC_DATE(format='%Y-%m-%d')(b)
        if error:
            (value, error) = IS_UTC_DATE()(b)
        if error:
            value = cls._datetime(b).date()
        return value
    else:
        raise TypeError
