diff --git a/src/components/day/day-sections.tsx b/src/components/day/day-sections.tsx index a4adfb11e..e2b627778 100644 --- a/src/components/day/day-sections.tsx +++ b/src/components/day/day-sections.tsx @@ -215,13 +215,11 @@ export function DayRunning({ }: { items: readonly DayRunningItem[]; /** The viewed day; a start date in another year names its year. */ - date?: DateKey; + date: DateKey; }) { const { t, locale } = useTranslations(); if (items.length === 0) return null; - const viewedYear = date - ? date.slice(0, 4) - : String(new Date().getUTCFullYear()); + const viewedYear = date.slice(0, 4); const intlLocale = resolveIntlLocale(locale); const sinceText = (since: string): string => new Intl.DateTimeFormat(intlLocale, { diff --git a/src/components/day/day-view.tsx b/src/components/day/day-view.tsx index 1cfd7d6b1..e8d4b145c 100644 --- a/src/components/day/day-view.tsx +++ b/src/components/day/day-view.tsx @@ -332,7 +332,7 @@ export function DayView({
) : ( <> -