
14 Apr
2004
14 Apr
'04
7:10 p.m.
Rob wrote:
Ok, but you need more than just LAST, you need LAST-1, LAST-2, and LAST-3
Why? I can't imagine a good use case for wanting one, two, or three days before the end of the month as a special form of date.
To make this work: date d = January LAST-1; // the 30th add_month(d); d == February 27th or 28th depending on the leap year, add_month(d); d == March 30th; Which is why the specialized function is the way to go. LAST isn't enough and anything else is cumbersome, buggy and hard to maintain. Yours, -Gary-