From d563a37f9f94ab5f8c77cbf644d8d2901ad74476 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Sun, 14 Jun 2009 14:05:53 -0400 Subject: empathy_time_to_string_relative was missing weeks This resulted in "0 month ago" being returned. --- libempathy/empathy-time.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libempathy') diff --git a/libempathy/empathy-time.c b/libempathy/empathy-time.c index 64350404c..5a934a5e3 100644 --- a/libempathy/empathy-time.c +++ b/libempathy/empathy-time.c @@ -152,6 +152,11 @@ empathy_time_to_string_relative (time_t then) return g_strdup_printf (ngettext ("%d day ago", "%d days ago", seconds), seconds); } + else if (seconds < (60 * 60 * 24 * 30)) { + seconds /= 60 * 60 * 24 * 7; + return g_strdup_printf (ngettext ("%d week ago", + "%d weeks ago", seconds), seconds); + } else { seconds /= 60 * 60 * 24 * 30; return g_strdup_printf (ngettext ("%d month ago", -- cgit v1.2.3