1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 10:36:38 +02:00

Fix Anope::Duration showing years failing

This commit is contained in:
Adam
2013-03-02 21:00:32 -05:00
parent 45c02f8e4e
commit 75999e05b9
+2 -2
View File
@@ -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)