Changes to UI and other stuff
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
export function fmtDateTime(d) {
|
||||
if (!d) return "";
|
||||
try {
|
||||
const dt = new Date(d);
|
||||
const datePart = dt.toLocaleDateString("sl-SI", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
});
|
||||
const timePart = dt.toLocaleTimeString("sl-SI", {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
hour12: false,
|
||||
});
|
||||
return `${datePart} ${timePart}`;
|
||||
} catch (e) {
|
||||
return String(d);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user