chore: remove 4 unused files (theme-editor-fields, use-user-bulk-actions, user-columns, use-media-library)
CI / check (push) Successful in 1m42s
CI / deploy (push) Successful in 1m36s
CI / e2e (push) Successful in 21s

This commit is contained in:
openhands committed 2026-09-05 23:27:02 +02:00
1 parent 9bc0834bbb
commit 9ae03056e2
17 files changed
+149 -1028

No files matched your search

+17 -1
View File
@@ -1,7 +1,12 @@
export type DateFormatVariant = "date" | "datetime" | "datetime-seconds";
export type DateFormatVariant =
| "date"
| "time"
| "datetime"
| "datetime-seconds";
const FALLBACKS: Record<DateFormatVariant, string> = {
date: "",
time: "—",
datetime: "—",
"datetime-seconds": "—",
};
@@ -11,6 +16,7 @@ const FALLBACKS: Record<DateFormatVariant, string> = {
* admin/site pages no longer each redefine their own copy.
*
* - "date" → 2026-07-18
* - "time" → 18:30
* - "datetime" → 2026-07-18 18:30
* - "datetime-seconds"→ 2026-07-18 18:30:45
*
@@ -27,9 +33,19 @@ export function formatDate(
switch (variant) {
case "date":
return iso.slice(0, 10);
case "time":
return iso.slice(11, 16);
case "datetime-seconds":
return iso.slice(0, 19).replace("T", " ");
default:
return iso.slice(0, 16).replace("T", " ");
}
}
/**
* Format a number with grouped thousands. Uses the provided locale or a
* consistent default for admin pages. Keeps number formatting in one place.
*/
export function formatNumber(n: number, locale: string = "en-US"): string {
return n.toLocaleString(locale);
}