in reply to Re^2: date tracking?
in thread date tracking?

You can calculate the date 7 days ago and 30 days ago using a number of modules including DateTime. Then all you need is a simple string or numerical comparison if you used an appropriate format ("yyyy/mm/dd" or epoch seconds).

Replies are listed 'Best First'.
Re^4: date tracking?
by ack (Deacon) on Aug 21, 2009 at 16:45 UTC

    Having done this same sort of thing quite a few times before, I agree with ikegami completely. When I discovered Date::Time it solved all of my problems. A little time thinking about *how* to use it...and it took very little time to do thinking given the tools that Date::Time provides... and I've never had to look back.

    I also often have issues, especially with cummulative counters, finding the number of "new" or "added" things during a particular time period. Date::Time, again, makes that easy.

    So I highly recommend getting to know Date::Time.

    ack Albuquerque, NM
      You keep mentioning Date::Time which consists entirely documentation of a interface concept. It has with no actual code. I believe you meant DateTime. The later is a well engineered module. It's great at not letting you do something that would be a bug.