From: cjwatson <> Date: Sat, 21 Sep 2002 00:24:45 +0000 (-0800) Subject: [project @ 2002-09-20 17:24:45 by cjwatson] X-Git-Tag: release/2.6.0~1050 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=96419d72d7c1e93a07a5d24426056f15b404a90a;p=debbugs.git [project @ 2002-09-20 17:24:45 by cjwatson] Drop "and 0 days" in bug ages where appropriate. --- diff --git a/cgi/common.pl b/cgi/common.pl index eb3a62d1..69dbdf1c 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -164,11 +164,13 @@ sub htmlindexentrystatus { $daysold = $daysold - $yearsold * 364; $result .= ";\n $font"; - $result .= "1 year and " if ($yearsold == 1); - $result .= "$yearsold years and " if ($yearsold > 1); - $result .= "1 day old" if ($daysold == 1); - $result .= "$daysold days old" if ($daysold != 1); - $result .= "$efont"; + my @age; + push @age, "1 year" if ($yearsold == 1); + push @age, "$yearsold years" if ($yearsold > 1); + push @age, "1 day" if ($daysold == 1); + push @age, "$daysold days" if ($daysold > 1); + $result .= join(" and ", @age); + $result .= " old$efont"; } }