discourse/app/assets/javascripts/discourse/helpers/format-age.js.es6
2015-08-10 10:21:05 -04:00

7 lines
269 B
JavaScript

import { autoUpdatingRelativeAge } from 'discourse/lib/formatter';
import registerUnbound from 'discourse/helpers/register-unbound';
registerUnbound('format-age', function(dt) {
dt = new Date(dt);
return new Handlebars.SafeString(autoUpdatingRelativeAge(dt));
});