This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/app/assets/javascripts/discourse/helpers/inline-date.js.es6
T
2016-10-28 12:48:56 -04:00

9 lines
285 B
JavaScript

import { relativeAge } from 'discourse/lib/formatter';
import { registerHelper } from 'discourse-common/lib/helpers';
registerHelper('inline-date', function([dt]) {
// TODO: Remove this in 1.13 or greater
if (dt.value) { dt = dt.value(); }
return relativeAge(new Date(dt));
});