localize timestamps

This commit is contained in:
2026-05-29 05:54:51 +03:00
parent 81fa054ddf
commit af5e838232
2 changed files with 10 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
export const b = {
babycodePreviewEndpoint: '/api/babycode-preview/',
init: 'babycodeEditorCharCountInit',
init: 'babycodeEditorCharCountInit localizeTimestamps',
}
const getThreadId = () => {
@@ -215,3 +215,11 @@ export async function copyCode(ev, sender, el) {
console.log(error);
}
}
export function localizeTimestamps(_, __, el) {
if (el === undefined) {
return;
}
const d = new Date(el.dateTime);
el.innerText = d.toLocaleString();
}