mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Make date-rendering consistent: show year if older than six months
This commit is contained in:
@@ -120,7 +120,7 @@ export function formatDateTimeShort(
|
||||
return formatTimestamp(timestamp, { weekday: 'short' });
|
||||
}
|
||||
|
||||
if (m.isSame(now, 'year')) {
|
||||
if (Math.abs(m.diff(Date.now())) < 6 * MONTH) {
|
||||
return formatTimestamp(timestamp, {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
@@ -157,7 +157,7 @@ export function formatDateTimeForAttachment(
|
||||
});
|
||||
}
|
||||
|
||||
if (m.isSame(now, 'year')) {
|
||||
if (Math.abs(m.diff(Date.now())) < 6 * MONTH) {
|
||||
return formatTimestamp(timestamp, {
|
||||
day: 'numeric',
|
||||
month: 'short',
|
||||
|
||||
Reference in New Issue
Block a user