The
Date::Manip module provides some easy methods for dealing with this sort of thing on a pretty high level. It's slower than
Date::Calc but for your problem it sounds like a one-shot calculation up front. For example you could do this:
$next_date = DateCalc($cur_date,"+ 1 month");
and it just does the right thing.
In your case, though, it sounds like you'd be looking backwards, so you might be using more along the lines of:
$activation_date = DateCalc('today', '- 1 month');
then checking your database for folks that signed up then.
Matt