From 96419d72d7c1e93a07a5d24426056f15b404a90a Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Fri, 20 Sep 2002 16:24:45 -0800 Subject: [PATCH] [project @ 2002-09-20 17:24:45 by cjwatson] Drop "and 0 days" in bug ages where appropriate. --- cgi/common.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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"; } } -- 2.39.5