Use shorter date format in title that fits better on narrow tabs

This commit is contained in:
2025-09-25 04:18:37 +00:00
parent e9e4147fdd
commit c6a597942d
2 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -185,9 +185,9 @@ function formatDateLong(date, includeYear = false) {
/**
* Format date as today string (e.g., "Monday\nJanuary 15")
*/
function formatTodayString(date) {
function formatTodayString(date, weekday = "long", month = "long") {
const formatted = date
.toLocaleDateString(undefined, { weekday: 'long', month: 'long', day: 'numeric' })
.toLocaleDateString(undefined, { weekday, month, day: 'numeric' })
.replace(/,? /, '\n')
return formatted.charAt(0).toUpperCase() + formatted.slice(1)
}