💄 animate exit and more

This commit is contained in:
Fred KISSIE
2025-11-07 00:27:57 +01:00
parent 45fb0a4156
commit f928708156
2 changed files with 127 additions and 85 deletions

View File

@@ -39,10 +39,9 @@ export function timeAgoFormatter(
unit = "year";
}
const rtf = new Intl.RelativeTimeFormat("en", {
const rtf = new Intl.RelativeTimeFormat(navigator.languages[0] ?? "en", {
numeric: "auto",
style: short ? "narrow" : "long"
});
const formatedValue = rtf.format(-value, unit);
return formatedValue === "now" ? "Just now" : formatedValue;
return rtf.format(-value, unit);
}