And, as others have stated (but I forgot): if you care about the day as well, then you need to add more code to make sure that "one month before March 31" results in "February 28th or 29th depending on whether it's a leap year" and not "February 31st".
It all depends on what problem you're trying to solve. If all you need is the right month, then your solution works in a clever way. But you're right, it's not the clearest code in the world... :)
Alan
In reply to Re: where does the time go?
by ferrency
in thread where does the time go?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |