in reply to figuring difference in times?
To get the number of weeks difference, either do:use Date::Calc qw /Localtime Delta_YMDHMS/; my @then = (Localtime(1112241312))[0..5]; my @now = (Localtime(time))[0..5]; print join ":", Delta_YMDHMS( @now, @then ); # S,M,H,D,M,Y
Or use the Weeks_in_Year and Week_of_Year methods.use Date::Calc qw/Delta_Days/; print Delta_Days( @now[0..2], @then[0..2] ) / 7;
|
|---|