SHA256
Добавить Canvas v4 для исследования связей
This commit is contained in:
@@ -95,11 +95,11 @@ export function formatShortAge(timestampMs) {
|
||||
if (!ts) return '';
|
||||
const ageMinutes = Math.max(0, Math.floor((Date.now() - ts) / 60000));
|
||||
if (ageMinutes < 1) return formatRelative(0, 'second');
|
||||
if (ageMinutes < 60) return formatRelative(-ageMinutes, 'minute', { numeric: 'always', style: 'narrow' });
|
||||
if (ageMinutes < 60) return formatRelative(-ageMinutes, 'minute', { numeric: 'always' });
|
||||
const ageHours = Math.floor(ageMinutes / 60);
|
||||
if (ageHours < 24) return formatRelative(-ageHours, 'hour', { numeric: 'always', style: 'narrow' });
|
||||
if (ageHours < 24) return formatRelative(-ageHours, 'hour', { numeric: 'always' });
|
||||
const ageDays = Math.floor(ageHours / 24);
|
||||
if (ageDays < 7) return formatRelative(-ageDays, 'day', { numeric: 'always', style: 'narrow' });
|
||||
if (ageDays < 7) return formatRelative(-ageDays, 'day', { numeric: 'always' });
|
||||
const dt = new Date(ts);
|
||||
const day = shortDay(dt);
|
||||
return dt.getFullYear() === new Date().getFullYear() ? day : `${day} ${dt.getFullYear()}`;
|
||||
|
||||
Reference in New Issue
Block a user