From 30feb2639fa1f0998a59f65959a7f0c3e15d31f8 Mon Sep 17 00:00:00 2001 From: SaharPak Date: Wed, 3 Jun 2026 10:03:13 +0000 Subject: [PATCH] chore: document next demo cutoff logic Clarify that nextDemoDate treats Friday before 18:00 Helsinki time as the upcoming demo so future edits preserve the cutoff behavior. Co-authored-by: Sahar --- src/lib/week.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/week.ts b/src/lib/week.ts index 96ae04a..88aefcf 100644 --- a/src/lib/week.ts +++ b/src/lib/week.ts @@ -31,6 +31,10 @@ export function currentWeekOf(): string { return format(startOfWeek(now, { weekStartsOn: 1 }), "yyyy-MM-dd"); } +/** + * Returns the next Friday 18:00 Helsinki demo cutoff. + * Before that hour on Friday, the current day is still the next demo. + */ export function nextDemoDate(): Date { const now = helsinkiNow(); if (isFriday(now) && now.getHours() < 18) {