0
0
Fork 0

Include time portion in formatted datetimes when provided (#33191)

This commit is contained in:
Emelia Smith 2025-01-08 15:26:08 +01:00 committed by GitHub
parent 2c36283a89
commit 15669fcf75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 4 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;
});