Fix relative time display for everything older than 1 day

This commit is contained in:
2023-04-07 15:57:13 +02:00
parent a484810d2f
commit cc180b40f1
2 changed files with 4 additions and 339 deletions

View File

@ -34,7 +34,7 @@ export function relativeTime(seconds: number): string | null {
}
const maxRelative = day * 31;
if (seconds < maxRelative) {
return `${seconds % day}d`;
return `${Math.floor(seconds / day)}d`;
}
return null;
}