The biggest issue with "subtracting months" is getting the right
definition of what you mean by that, especially in the corner cases,
once that is established, programming it is fairly easy.
The problem is that a month isn't a fixed unit of time, but is a period
anywhere from 28 to 31 days. (you get the same problem for years, but
the difference is more special case, the presence or absent of Feb 29th.)
The normal definition of this operation has the strange property that if
you subtract a month, then add a month, you sometimes don't get back to
the same day as you started with. Also subtracting one month, and then
subtracting another month might get you a different day than subtracting
2 months at once (Think of Mar 31st).
In short, this sort of date operation IS hard, and application specific,
so while there may be pre-built modules that have this operation, you
need to see if it uses a compatible definition of what you want.
One alternative, which breaks other expectations, is to think of a month
as 30 or 30.5 (so 2 months are 61 days) days, and add that. It says that
often a month later than a given day isn't the same day of the month,
but does make some operations less surprising. (This is hard to do to a
date expressed as year-month-day, but trivial in some other formats like
a timestamp.)
--
Richard Damon