fix(calendar): mark today and past days from the Europe/Paris date #312

Merged
nessar merged 2 commits from feature/301-paris-today into develop 2026-10-19 14:16:58 +02:00
Owner

Summary

The calendar today marker and past styling used the device local date, while the default planning horizon starts on the Europe/Paris date. Outside Paris time near midnight (every CI runner in UTC, nightly) the first horizon day was not marked as today. This implements the decisions recorded on #301.

  • CalendarService.project(plan, { now }) derives today once with planningDateInParis(now) and returns it as CalendarProjection.today.
  • calendar-year passes it to app-calendar-month [today]; past styling becomes dateKey < today.
  • Deletes DateCacheService, monthsInAYearFromNow() and the default year of getHolidays(), whose only callers were their own specs.
  • docs(context): CONTEXT.md defines Today as the Europe/Paris calendar date.

Out of scope, per the issue: TIME_WINDOW date shift (#311) and form defaults, which keep the device date.

Closes #301

Test plan

  • New regression test pins now to 2026-10-17T22:16:00Z under TZ=UTC: today is 2026-10-18 and only that day is marked. It fails against the previous code and against a local-date variant.
  • New calendar-month test: only dates before the given today are styled past.
  • The existing default-horizon test passes one now to getDefaultPlanningHorizon and project instead of relying on the wall clock.
  • After rebasing on develop (c6af6d4): TZ=UTC bun run test 764 pass / 0 fail; typecheck, lint and format:check clean. Targeted specs also pass under Europe/Paris and Pacific/Honolulu.

🤖 Generated with Claude Code

## Summary The calendar today marker and past styling used the device local date, while the default planning horizon starts on the Europe/Paris date. Outside Paris time near midnight (every CI runner in UTC, nightly) the first horizon day was not marked as today. This implements the decisions recorded on #301. - CalendarService.project(plan, { now }) derives today once with planningDateInParis(now) and returns it as CalendarProjection.today. - calendar-year passes it to app-calendar-month [today]; past styling becomes dateKey < today. - Deletes DateCacheService, monthsInAYearFromNow() and the default year of getHolidays(), whose only callers were their own specs. - docs(context): CONTEXT.md defines Today as the Europe/Paris calendar date. Out of scope, per the issue: TIME_WINDOW date shift (#311) and form defaults, which keep the device date. Closes #301 ## Test plan - New regression test pins now to 2026-10-17T22:16:00Z under TZ=UTC: today is 2026-10-18 and only that day is marked. It fails against the previous code and against a local-date variant. - New calendar-month test: only dates before the given today are styled past. - The existing default-horizon test passes one now to getDefaultPlanningHorizon and project instead of relying on the wall clock. - After rebasing on develop (c6af6d4): TZ=UTC bun run test 764 pass / 0 fail; typecheck, lint and format:check clean. Targeted specs also pass under Europe/Paris and Pacific/Honolulu. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nessar added 2 commits 2026-10-19 14:11:30 +02:00
The today marker and past styling follow the same Paris date that
starts the default planning horizon (#301).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(calendar): mark today and past days from the Europe/Paris date
CI / policy (pull_request) Successful in 8s
CI / validate (pull_request) Successful in 31s
CI / build (pull_request) Successful in 29s
CI / benchmark (pull_request) Successful in 1m34s
CI / security (pull_request) Successful in 1m3s
CI / test (pull_request) Successful in 2m9s
CI / images (pull_request) Successful in 1m10s
CI / required (pull_request) Successful in 1s
CI / policy (push) Successful in 8s
CI / validate (push) Successful in 36s
CI / build (push) Successful in 34s
CI / benchmark (push) Successful in 1m39s
CI / security (push) Successful in 1m8s
CI / test (push) Successful in 2m20s
CI / images (push) Successful in 1m1s
CI / required (push) Successful in 1s
ff6c4d8122
The today marker and past styling used the device's local date while the
default planning horizon starts on the Paris date, so outside Paris time
near midnight the horizon's first day was not marked as today (CI in UTC
failed nightly). project() now takes an injectable now, derives today once
with planningDateInParis and returns it; calendar-month styles a day as
past when its date key is before that today.

Delete DateCacheService, monthsInAYearFromNow() and the default year of
getHolidays(), whose only remaining callers were their own specs.

Refs #301

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nessar merged commit ff6c4d8122 into develop 2026-10-19 14:16:58 +02:00
nessar deleted branch feature/301-paris-today 2026-10-19 14:16:58 +02:00
Sign in to join this conversation.