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 #### use Date::Calc qw/Delta_Days/; print Delta_Days( @now[0..2], @then[0..2] ) / 7;