mirror of
https://github.com/flarum/core.git
synced 2025-07-12 12:26:23 +02:00
Switch from 'moment' to 'dayjs' (#2219)
* Switch from 'moment' to 'dayjs' * Use humanize code from duration plugin (without actual plugin) for time lapsed events
This commit is contained in:
committed by
GitHub
parent
640cc0989b
commit
8dd5420405
@ -230,7 +230,7 @@ class PostStream extends Component {
|
||||
if (dt > 1000 * 60 * 60 * 24 * 4) {
|
||||
content = [
|
||||
<div className="PostStream-timeGap">
|
||||
<span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: moment.duration(dt).humanize() })}</span>
|
||||
<span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: dayjs().add(dt, 'ms').fromNow(true) })}</span>
|
||||
</div>,
|
||||
content,
|
||||
];
|
||||
|
Reference in New Issue
Block a user