Files
errors.bitreport.pt/admin-ui/lib/format.ts
T
1sonhadorandPaperclip b0b733d5e1 feat(BIT-247): consolidate error reporting repo from OTT
Merge ingest-api, collector-worker, admin-ui, database/error_reporting, deploy/lxc,
docker-compose, and deployment docs into the dedicated repository. Paths updated
for repo root (ER_REPO_ROOT, systemd WorkingDirectory). Root README documents layout.

Co-Authored-By: Paperclip <[email protected]>
2026-03-22 18:20:27 +00:00

15 lines
306 B
TypeScript

export function formatDateTime(iso: string): string {
try {
const _d = new Date(iso);
if (Number.isNaN(_d.getTime())) {
return iso;
}
return new Intl.DateTimeFormat("pt-PT", {
dateStyle: "short",
timeStyle: "medium",
}).format(_d);
} catch {
return iso;
}
}