Shane Laffin wrote at Thu, 15 Aug 2002 07:05:15 +0200:

>       How do I compare two dates in the format:
> 
>               Thu Aug 15 2002 15:12:02
> 
>       to return if one date is higher than the other.
> 
> Does anyone have any ideas on suitable modules, most
> the date modules I have looked at dont deal with this
> date format.

use Date::Manip;

my $start = ParseDate("Thu Aug 15 2002 15:12:02");
my $end   = ParseDate("Thu Aug 16 2002 15:12:02");

if (Date_Cmp($start, $end) <= 0) {
   print "The start is before the end.";
}


Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to