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]>
15 lines
306 B
TypeScript
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;
|
|
}
|
|
}
|