v3: performance pass, bundle size pass, i18n pass, docker pass

This commit is contained in:
khannurien
2026-04-08 13:19:39 +00:00
parent 20b9bfe7b4
commit 1321e374bf
21 changed files with 502 additions and 301 deletions

View File

@@ -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;