[Glitch] Include time portion in formatted datetimes when provided

Port JS part of 15669fcf75e79b4f6a2fe0c09ee8ae56d1a25270 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Emelia Smith 2025-01-08 15:26:08 +01:00 committed by Claire
parent 19b9884bb2
commit fb48fc4cce

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;
});