From eb8a221294e7d8b488d171d62595ace9e21d14e2 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 14 Jun 2007 14:04:06 +0100 Subject: [PATCH] fix mistake in days returned by secs_to_english --- Debbugs/Common.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5