mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +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
@@ -54,7 +54,7 @@ Object.assign(User.prototype, {
|
||||
* @public
|
||||
*/
|
||||
isOnline() {
|
||||
return this.lastSeenAt() > moment().subtract(5, 'minutes').toDate();
|
||||
return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());
|
||||
},
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user