discourse/app/assets/javascripts/discourse/helpers/format-age.js.es6

8 lines
269 B
Text
Raw Normal View History

2015-08-07 15:08:27 -04:00
import { autoUpdatingRelativeAge } from 'discourse/lib/formatter';
2014-12-10 15:00:58 -05:00
import registerUnbound from 'discourse/helpers/register-unbound';
registerUnbound('format-age', function(dt) {
dt = new Date(dt);
2015-08-07 15:08:27 -04:00
return new Handlebars.SafeString(autoUpdatingRelativeAge(dt));
2014-09-12 14:27:34 -04:00
});