From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Wed, 3 Jan 2001 13:36:32 +0000 (+0000)
Subject: - add 'days' to created_time output.
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dc901fc660cb531b30d6138764e64894b4e78701;p=infobot.git

- add 'days' to created_time output.


git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@219 c11ca15a-4712-0410-83d8-924469b57eb5
---

diff --git a/blootbot/src/Modules/Factoids.pl b/blootbot/src/Modules/Factoids.pl
index 1e231ef..bde4b98 100644
--- a/blootbot/src/Modules/Factoids.pl
+++ b/blootbot/src/Modules/Factoids.pl
@@ -43,7 +43,9 @@ sub CmdFactInfo {
 	my $time = $factinfo{'created_time'};
 	if ($time) {
 	    if (time() - $time > 60*60*24*7) {
-		$string .= " at \037". scalar(localtime $time). "\037";
+		my $days = int( (time() - $time)*60*60*24 );
+		$string .= " at \037". scalar(localtime $time). "\037" .
+				" ($days days) ";
 	    } else {
 		$string .= " ".&Time2String(time() - $time)." ago";
 	    }