move date-fmt to the bitty script

This commit is contained in:
2025-12-01 01:30:41 +03:00
parent 5c03ba3d3a
commit db2d09cb03
3 changed files with 8 additions and 11 deletions

View File

@@ -246,4 +246,12 @@ export default class {
el.scrollIntoView();
el.focus();
}
convertTimestamps(ev, el) {
const timestamp = el.getInt('utc');
if (!isNaN(timestamp)) {
const date = new Date(timestamp * 1000);
el.textContent = date.toLocaleString();
}
}
}