From: Don Armstrong Date: Thu, 14 Jun 2007 13:04:06 +0000 (+0100) Subject: fix mistake in days returned by secs_to_english X-Git-Tag: release/2.6.0~556^2~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eb8a221294e7d8b488d171d62595ace9e21d14e2;p=debbugs.git fix mistake in days returned by secs_to_english --- diff --git a/Debbugs/Common.pm b/Debbugs/Common.pm index 60e2c309..f88a2f47 100644 --- a/Debbugs/Common.pm +++ b/Debbugs/Common.pm @@ -254,7 +254,7 @@ sub secs_to_english{ my $days = int($seconds / 86400); my $years = int($days / 365); - $days -= $years * 365; + $days %= 365; my $result; my @age; push @age, "1 year" if ($years == 1); @@ -263,7 +263,7 @@ sub secs_to_english{ push @age, "$days days" if ($days > 1); $result .= join(" and ", @age); - return wantarray?($days,$result):$result; + return wantarray?(int($seconds/86400),$result):$result; }