From 235214642e20b9adadfbe59180e3b4ea7ff6e3cb Mon Sep 17 00:00:00 2001 From: David Jay Date: Mon, 30 Jan 2017 17:55:06 -0500 Subject: [PATCH] Fixing bug where timeAgo cannot interpret dates from mongoose properly. --- client/coral-framework/modules/i18n/i18n.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-framework/modules/i18n/i18n.js b/client/coral-framework/modules/i18n/i18n.js index d4ed36b09..08fc1c451 100644 --- a/client/coral-framework/modules/i18n/i18n.js +++ b/client/coral-framework/modules/i18n/i18n.js @@ -70,7 +70,7 @@ class i18n { }; this.timeago = (time) => { - return this.timeagoInstance.format(time); + return this.timeagoInstance.format(new Date(time)); }; } }