1
0
mirror of https://github.com/flarum/core.git synced 2025-06-05 22:25:29 +02:00
php-flarum/js/lib/initializers/timestamps.js

11 lines
254 B
JavaScript

import humanTime from 'flarum/utils/human-time';
export default function(app) {
setInterval(function() {
$('[data-humantime]').each(function() {
var $this = $(this);
$this.html(humanTime($this.attr('datetime')));
});
}, 1000);
}