from datetime import datetime


def int_to_date(d):
    """
    Converts an integer representation of a date to a date object or None.
    """
    if d == 0:
        return None
    return datetime.strptime(str(d), '%Y%m%d').date()