From e5b8034e0ffe7eae5b0ad3f9bf7e8a740d354375 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 19 Jan 2015 22:25:03 +0000 Subject: [PATCH] order by int not string --- modules/report/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/report/commands.js b/modules/report/commands.js index d16fcbc..615fe8a 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -114,7 +114,7 @@ var commands = function(dbot) { event.reply(user.primaryNick + ' has been warned ' + warn + ' times, quieted ' + quiet + ' times, and reported ' + report + ' times.'); _.each(_.keys(items).sort(function(a, b) { - return parseInt(a) - parseInt(b); + return parseInt(new Date(a).getTime()) - parseInt(new Date(b).getTime()); }), function(time) { event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]); });