From 61856c3cf6cca28ca8eecf03ef227bcc000a4332 Mon Sep 17 00:00:00 2001 From: gaba Date: Mon, 15 May 2017 16:04:10 -0700 Subject: [PATCH] Use timeago. --- client/coral-plugin-pubdate/PubDate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/coral-plugin-pubdate/PubDate.js b/client/coral-plugin-pubdate/PubDate.js index 5875d0f83..0f36ce918 100644 --- a/client/coral-plugin-pubdate/PubDate.js +++ b/client/coral-plugin-pubdate/PubDate.js @@ -1,11 +1,12 @@ import React from 'react'; +import timeago from 'timeago.js'; import {I18n} from '../coral-framework'; const lang = new I18n(); const name = 'coral-plugin-pubdate'; const PubDate = ({created_at}) =>
- {lang.timeago(created_at)} + {timeago().format(created_at, lang.getLocale().replace('-', '_'))}
; export default PubDate;