stupid eslint
All checks were successful
Deploy SSR / deploy (push) Successful in 1m4s

This commit is contained in:
Lee 2024-09-11 20:16:33 +01:00
parent 9add35a428
commit 188513de70

@ -17,7 +17,7 @@ export function timeAgo(input: Date | number) {
second: 1, second: 1,
}; };
const secondsElapsed = (date.getTime() - Date.now()) / 1000; const secondsElapsed = (date.getTime() - Date.now()) / 1000;
for (let key in ranges) { for (const key in ranges) {
if (ranges[key] < Math.abs(secondsElapsed)) { if (ranges[key] < Math.abs(secondsElapsed)) {
const delta = secondsElapsed / ranges[key]; const delta = secondsElapsed / ranges[key];
return formatter.format(Math.round(delta), key as Intl.RelativeTimeFormatUnit); return formatter.format(Math.round(delta), key as Intl.RelativeTimeFormatUnit);