This commit is contained in:
the-djmaze 2023-01-30 15:49:58 +01:00
parent e23e0138a9
commit c21817e5e0
10 changed files with 52 additions and 22 deletions

View file

@ -47,6 +47,7 @@ export const
let rtf = new Intl.RelativeTimeFormat(doc.documentElement.lang);
return rtf.format(seconds, unit);
}
// Safari < 14
abs = Math.abs(seconds);
let rtf = rl.relativeTime.long[unit][0 > seconds ? 'past' : 'future'],
plural = rl.relativeTime.plural(abs);