def addYears(date, value):
    """Add or subtract an amount of years to a given date and time.

    Args:
        date (Date): The starting date.
        value (int): The number of units to add, or subtract if the
            value is negative.

    Returns:
        Date: A new date object offset by the integer passed to the
            function.
    """
    return date.replace(year=date.year + value)