Sep 1, 2000, 2:57 AM
Post #6 of 7
Wouldn't make much sense if it was the other way around.
BTW, the only lines you really need are ...
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>
use Date::Calc qw( Delta_Days );
my $days = Delta_Days( @then, @now );</pre><HR></BLOCKQUOTE>
Delta_Days() expects it's input to be a six-element array consisting of $year1, $month1, $day1 (aka @then, 3 elements), $year2, $month2, and $day2 (aka @now, another 3 elements), so most of that code just deals with taking a string (ie, 20000901) and breaking that up into an array (ie ("2000","09","01") ).
If your dates were already in array form, you could just use the barebones version of the code above.
Those names of variables, BTW, are purely arbritrary.