def parse_date(value):
    if not value:
        return None
    elif isinstance(value, datetime.date):
        return value
    elif isinstance(value, datetime.datetime):
        return value.date()
    else:
        return dateutil.parser.parse(value).date()
When the L{ILogObserver} component is available on the application,
dataset/ETHPy150Open STIXProject/python-stix/stix/utils/dates.py/parse_date--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/test/test_twistd.py/AppLoggerTestCase.test_startUsesApplicationLogObserver