v3: performance pass, bundle size pass, i18n pass, docker pass
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
||||
import { i18n } from "../i18n.ts";
|
||||
|
||||
export function relativeTime(date: Date): string {
|
||||
const rtf = new Intl.RelativeTimeFormat(i18n.locale, { numeric: "auto" });
|
||||
const diff = date.getTime() - Date.now(); // negative = past
|
||||
const abs = Math.abs(diff) / 1000;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user