localize timestamps
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user