From 719a1c49967516ccf7b27c28a2f15e86d7eb1448 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Tue, 7 Jun 2011 12:40:38 +0200 Subject: Minor Bugfix. Age of the last article. --- pyAggr3g470r.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyAggr3g470r.py') diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 737b109e..2b47ec87 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -570,7 +570,7 @@ class Root: first_article = utils.string_to_datetime(feed.articles.values()[-1].article_date) delta = last_article - first_article delta_today = datetime.datetime.fromordinal(datetime.date.today().toordinal()) - last_article - html += "

The last article was posted " + str(abs(delta_today.days)) + " day(s) ago.

" + html += "

The last article was posted " + str(abs(delta_today.days) - 1) + " day(s) ago.

" if delta.days > 0: html += """

Daily average: %s,""" % (str(round(float(feed.nb_articles)/abs(delta.days), 2)),) html += """ between the %s and the %s.

\n""" % \ -- cgit