def convert_8_int_to_tuple(int_date):
    """ Converts an 8-digit integer date (e.g. 20161231) to a date tuple (Y,M,D).
    """
    return (int(str(int_date)[0:4]), int(str(int_date)[4:6]), int(str(int_date)[6:8]))