From 404b31046695772518166f291a37d45e33b2fc8e Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 13 Nov 2026 11:18:27 +0100 Subject: [PATCH] Day view: title names the month, like the other views (#501) --- .../calendula/ui/week/WeekScreen.kt | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt index f05c0fc8..5fa8dcfd 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/week/WeekScreen.kt @@ -312,12 +312,9 @@ internal enum class TimelineKind( Day(showWeekNumber = false, todayText = R.string.day_today_action, headerBias = -1f), ; + // The day view names the month too: its header already shows weekday and date (#501). fun title(start: LocalDate, end: LocalDate, locale: Locale, currentYear: Int, abbreviated: Boolean): String = - if (this == Day) { - formatDayTitle(start, locale, currentYear, abbreviated) - } else { - formatWeekTitle(start, end, locale, currentYear, abbreviated) - } + formatWeekTitle(start, end, locale, currentYear, abbreviated) } internal val CalendarView.timelineKind: TimelineKind @@ -2046,17 +2043,3 @@ private fun formatWeekTitle( forceYear = weekEnd.year != weekStart.year, ) } - -/** The day's title: its weekday and date, abbreviated to the date alone when short of room. */ -private fun formatDayTitle( - date: LocalDate, - locale: Locale, - currentYear: Int, - abbreviated: Boolean = false, -): String = - formatCalendarTitle( - date = date.toJavaLocalDate(), - locale = locale, - currentYear = currentYear, - skeleton = if (abbreviated) "dMMM" else "EEEdMMM", - )