mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 04:42:02 -05:00
7 lines
269 B
JavaScript
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));
|
|
});
|