'Initializer value can be:
- integer_type: absolute days from epoch (1970, 1, 1). Can be negative.
- datetime.date: built-in date
- string_type: a string time of the form "yyyy-mm-dd"'

def __init__(self, value):

    if isinstance(value, six.integer_types):
        self.days_from_epoch = value
    elif isinstance(value, (datetime.date, datetime.datetime)):
        self._from_timetuple(value.timetuple())
    elif isinstance(value, six.string_types):
        self._from_datestring(value)
    else:
        raise TypeError('Date    arguments    must    be    a    whole    number,    datetime.date,    or    string')
