Skip to content

Commit 1518a5d

Browse files
committed
format timestamps
1 parent 83f4c72 commit 1518a5d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ async function update() {
2323

2424
posts.innerHTML = ''
2525

26-
for(const note of notes) {
26+
for(const note of notes) {
2727

2828
const li = document.createElement('li')
2929

30-
li.innerText = JSON.stringify(note);
30+
const timestamp = new Date(note.time)
31+
li.innerText = `${note.text} (${timestamp.toLocaleString()})`
3132

3233
posts.appendChild(li)
3334

0 commit comments

Comments
 (0)