diff --git a/extensions/suspend/js/src/forum/components/SuspendUserModal.js b/extensions/suspend/js/src/forum/components/SuspendUserModal.js index 984cde8fd..8f724e009 100644 --- a/extensions/suspend/js/src/forum/components/SuspendUserModal.js +++ b/extensions/suspend/js/src/forum/components/SuspendUserModal.js @@ -16,7 +16,7 @@ export default class SuspendUserModal extends Modal { } this.status = m.prop(status); - this.daysRemaining = m.prop(status === 'limited' && -moment().diff(until, 'days') + 1); + this.daysRemaining = m.prop(status === 'limited' && -dayjs().diff(until, 'days') + 1); } className() { @@ -88,7 +88,7 @@ export default class SuspendUserModal extends Modal { break; case 'limited': - suspendedUntil = moment().add(this.daysRemaining(), 'days').toDate(); + suspendedUntil = dayjs().add(this.daysRemaining(), 'days').toDate(); break; default: diff --git a/extensions/suspend/js/src/forum/components/UserSuspendedNotification.js b/extensions/suspend/js/src/forum/components/UserSuspendedNotification.js index 228f26778..8e7114327 100644 --- a/extensions/suspend/js/src/forum/components/UserSuspendedNotification.js +++ b/extensions/suspend/js/src/forum/components/UserSuspendedNotification.js @@ -12,7 +12,7 @@ export default class UserSuspendedNotification extends Notification { content() { const notification = this.props.notification; const suspendedUntil = notification.content(); - const timeReadable = moment(suspendedUntil.date).from(notification.createdAt(), true); + const timeReadable = dayjs(suspendedUntil.date).from(notification.createdAt(), true); return app.translator.trans('flarum-suspend.forum.notifications.user_suspended_text', { user: notification.fromUser(),