def date_in_range(data, created_after='', created_before='', updated_after=
    '', updated_before=''):
    """
    Returns true if issue/MR is in the given range.
    """
    is_created_after = not created_after
    is_created_before = not created_before
    is_updated_after = not updated_after
    is_updated_before = not updated_before
    if created_after and data['created_at'] > str(created_after):
        is_created_after = True
    if created_before and data['created_at'] < str(created_before):
        is_created_before = True
    if updated_after and data['updated_at'] > str(updated_after):
        is_updated_after = True
    if updated_before and data['updated_at'] < str(updated_before):
        is_updated_before = True
    return (is_created_after and is_created_before and is_updated_after and
        is_updated_before)
