[Glitch] Include time portion in formatted datetimes when provided

Port JS part of 15669fcf75 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2937/head
Emelia Smith 2025-01-08 15:26:08 +01:00 committed by Claire
parent 19b9884bb2
commit fb48fc4cce
1 changed files with 5 additions and 1 deletions

View File

@ -119,7 +119,11 @@ function loaded() {
formattedContent = dateFormat.format(datetime);
}
content.title = formattedContent;
const timeGiven = content.dateTime.includes('T');
content.title = timeGiven
? dateTimeFormat.format(datetime)
: dateFormat.format(datetime);
content.textContent = formattedContent;
});