feat: page labels/tags (#2188)

* feat: labels (WIP)
* full implementation
This commit is contained in:
Philip Okugbe
2026-05-10 18:14:15 +01:00
committed by GitHub
parent 537e45bc11
commit a689cca7a0
32 changed files with 2329 additions and 123 deletions
@@ -0,0 +1,15 @@
import { format, isThisYear, isToday, isYesterday } from "date-fns";
import i18n from "@/i18n.ts";
export function formatLabelListDate(date: Date): string {
if (isToday(date)) {
return i18n.t("Today, {{time}}", { time: format(date, "h:mma") });
}
if (isYesterday(date)) {
return i18n.t("Yesterday, {{time}}", { time: format(date, "h:mma") });
}
if (isThisYear(date)) {
return format(date, "MMM dd");
}
return format(date, "MMM dd, yyyy");
}