mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +08:00
12 lines
309 B
JavaScript
12 lines
309 B
JavaScript
import humanTime from 'flarum/utils/human-time';
|
|
|
|
export default function humanTimeHelper(time) {
|
|
var time = moment(time);
|
|
var datetime = time.format();
|
|
var full = time.format('LLLL');
|
|
|
|
var ago = humanTime(time);
|
|
|
|
return m('time', {pubdate: '', datetime, title: full, 'data-humantime': ''}, ago);
|
|
}
|