@staticmethod
def _normalize_date(somedate):
    """
        Take a date or datetime and turn them into the string YYYY-MM-DD. If `somedate` is None, returns an
        empty string.

        :param somedate: the date to be coerced into a YYYY-MM-DD format
        :type somedate: datetime.date|datetime.datetime|str
        :return: a string in the format YYYY-MM-DD
        :rtype: str
        """
    if somedate is None:
        return ''
    try:
        somedate = somedate.strftime('%Y-%m-%d')
    except AttributeError:
        pass
    return somedate
