Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Compare Date

by mojotoad (Monsignor)
on Mar 05, 2002 at 18:23 UTC ( [id://149461]=note: print w/replies, xml ) Need Help??


in reply to Compare Date

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://149461]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2025-04-18 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.