Mercurial Hosting > chat
changeset 39:471b13e6ce2c
date formatting
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 17 Nov 2024 12:06:08 -0700 |
parents | 436216d17a1b |
children | 7ea33179592a |
files | src/chat.js |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/chat.js Tue Nov 12 21:53:03 2024 -0700 +++ b/src/chat.js Sun Nov 17 12:06:08 2024 -0700 @@ -75,7 +75,7 @@ let divs = document.querySelectorAll('div[post][fix]'); for( let div of divs ) { let whenSpan = div.querySelector('span[when]'); - whenSpan.textContent = new Date(Number(whenSpan.textContent)).toLocaleString(); + whenSpan.textContent = new Date(Number(whenSpan.textContent)).toLocaleString([],{dateStyle:'short',timeStyle:'short'}); let textDiv = div.querySelector('div[text]'); textDiv.innerHTML = urlsToLinks(textDiv.innerHTML); if( div.getAttribute('author') === userId )