http://www.perlmonks.org?node_id=119289


in reply to comparing dates

Ahhh, yes.. comparing dates. I've always found that the absolute easiest way to compare two dates is by first converting them to seconds (seconds since the epoch, to be specific).

You didn't show the particular format of date which you are using -- however, assuming that you have any kind of date format but seconds since the epoch, you can use the Time::Local module to convert it for you. Once you convert it to seconds, you're simply comparing two integers, which is very trivial.

If you read the post Re: Within A Date Time Range, I offered an example implementation on how this might be done. However, if you make use of Super Search, there's bound to be some other examples of that too. Also, you may want to check out Date format manipulation, which was posted just a few hours before your question.

Good luck!
-Eric