Shame on someone for not handling the error.
Regarding the INTERVAL logic, if you add or subtract a month interval from a date that results in the day being outside the number of days in the month (going from March with 31 to April with 30 for example) the statement will throw an error.
The developer is better off using the Oracle function ADD_MONTHS which does not throw an error. If the application needs a value of the first of the month if 31 days then the application should probably be subtracting days instead of months. If the warranty expires in 90 days then add 90 days. If the warranty expires in three months then unless there is some complex logic in the contract it should end on June 30 and not July 1 (just assuming).
SELECT SYSDATE FROM DUAL;The INTERVAL logic has been discussed elsewhere including a comment from Tom Kyte about the pure ANSI implementation. I document it here to spread the word and hopefully keep others from banging their heads into a frothy pulp over silly crap like this. Standards; gotta love them.
SELECT SYSDATE - INTERVAL '2' MONTH FROM DUAL;
SELECT SYSDATE - INTERVAL '4' MONTH FROM DUAL;
ORA-01839: date not valid for month specified
SELECT ADD_MONTHS(SYSDATE,-4) FROM DUAL;