Avoid having to parse strings

This commit is contained in:
Jorge Manrubia
2025-09-11 16:29:07 +02:00
parent ef6bd0daf6
commit 05d3375a7d
2 changed files with 2 additions and 2 deletions
@@ -89,7 +89,7 @@ export default class extends Controller {
}
#formatTime(formatter, target) {
const dt = new Date(target.getAttribute("datetime"))
const dt = new Date(parseInt(target.getAttribute("datetime"))*1000)
target.innerHTML = formatter.format(dt)
target.title = this.datetimeFormatter.format(dt)
}