posted 15 years ago
As you have seen, in the first case, adding a month will get you to the same day of the month in the following month.
As you have seen, in the second case, if the same day doesn't exist in the following month, the class is smart enough to subtract until it is a valid day in the following month.
There is no special logic that detects the end of month, and understands that you want the end of the following month. For that, you will have to do it yourself.
Henry