fix(admin): display year for user tables if not current year. Closes #3175
This commit is contained in:
parent
0c3f317f13
commit
d43c2be44a
@ -7,6 +7,11 @@ import { UserPopover } from './UserPopover';
|
||||
import { BanUserButton } from './BanUserButton';
|
||||
|
||||
export function formatDisplayDate(date: string | Date) {
|
||||
const d = new Date(date);
|
||||
if (d.getFullYear() !== new Date().getFullYear()) {
|
||||
return format(new Date(date), 'MMM d, yyyy H:mma');
|
||||
}
|
||||
|
||||
return format(new Date(date), 'MMM d H:mma');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user