diff options
-rw-r--r-- | src/misc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.cpp b/src/misc.cpp index e9e5c68a3..ad8512c56 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -270,7 +270,7 @@ Anope::string Anope::Duration(time_t t, const NickCore *nc) { /* We first calculate everything */ time_t years = t / 31536000; - time_t days = (t / 86400); + time_t days = (t / 86400) % 365; time_t hours = (t / 3600) % 24; time_t minutes = (t / 60) % 60; time_t seconds = (t) % 60; @@ -289,7 +289,7 @@ Anope::string Anope::Duration(time_t t, const NickCore *nc) if (days) { buffer += need_comma ? ", " : ""; - buffer = stringify(days) + " " + (days != 1 ? Language::Translate(nc, _("days")) : Language::Translate(nc, _("day"))); + buffer += stringify(days) + " " + (days != 1 ? Language::Translate(nc, _("days")) : Language::Translate(nc, _("day"))); need_comma = true; } if (hours) |