Returns all dateints in the given dateint range.

    Arguments
    ---------
    first_dateint : int
        An integer object decipting a specific calendaric day; e.g. 20161225.
    last_dateint : int
        An integer object decipting a specific calendaric day; e.g. 20170108.

    Returns
    -------
    iterable
        An iterable of ints representing all days in the given dateint range.

    Example
    -------
    >>> dateint_range(20170228, 20170301)
    [20170228, 20170301]
    >>> dateint_range(20170225, 20170301)
    [20170225, 20170226, 20170227, 20170228, 20170301]

def dateint_range(first_dateint, last_dateint):
    """Returns all dateints in the given dateint range.

    Arguments
    ---------
    first_dateint : int
        An integer object decipting a specific calendaric day; e.g. 20161225.
    last_dateint : int
        An integer object decipting a specific calendaric day; e.g. 20170108.

    Returns
    -------
    iterable
        An iterable of ints representing all days in the given dateint range.

    Example
    -------
    >>> dateint_range(20170228, 20170301)
    [20170228, 20170301]
    >>> dateint_range(20170225, 20170301)
    [20170225, 20170226, 20170227, 20170228, 20170301]
    """
    first_datetime = dateint_to_datetime(first_dateint)
    last_datetime = dateint_to_datetime(last_dateint)
    delta = last_datetime - first_datetime
    delta_in_hours = math.ceil(delta.total_seconds() / 3600)
    delta_in_days = math.ceil(delta_in_hours / 24) + 1
    dateint_set = set()
    for delta_i in range(0, delta_in_days * 24, 24):
        datetime_i = first_datetime + timedelta(hours=delta_i)
        dateint_i = datetime_to_dateint(datetime_i)
        if dateint_i <= last_dateint:
            dateint_set.add(dateint_i)
    return sorted(dateint_set)