feat(statistics): Closed Days are not business days #103

Closed
opened 2026-09-25 17:29:03 +00:00 by gabogg · 0 comments
Owner

Step 1 of the pre-deck work agreed on 2026-09-25 (grilling session after the #89–#94 merges). Decisions below are settled.

Problem

The facility can already declare a closed day: a weekday unchecked in the weekly schedule (occupancy_daily_schedule.is_open = 0) or a dated entry marked closed (occupancy_holidays.is_open = 0). Statistics ignore it. A closed day with no counted data makes its week/month a Partial Period exactly like an outage, and a closed day with staff passages is counted as a normal business day.

Decisions

  • New glossary term Closed Day: a business day on which the facility's schedule declares it closed to the public, through its weekday schedule or a dated exception. It is not a business day for statistics. Avoid: holiday (a holiday may be open with its own hours), outage (missing data on an open day).
  • A Closed Day is excluded from business_days, so it never makes a period partial and never lowers the daily average.
  • Its counted passages (guards, staff) stay stored and visible in operations views, but do not enter statistics figures: period visitors/egress, daily average, busiest/best day, highest peak, weekend share, entrance totals and shares.
  • It is never a Usual Weekday Baseline sample.
  • Selecting a Closed Day directly: the summary returns a closed status instead of KPIs (no 404/422 surprise for the deck).
  • Picker quality and daily rows expose it: closed_days on PeriodQuality, is_closed on DailyStatistics.
  • Comparisons keep comparing totals; the badge explains fewer business days.
  • Closure resolution uses the same precedence as the live schedule: a dated entry overrides the weekday schedule.

Out of scope

  • Calibration treatment of Closed Days (separate follow-up).
  • Renaming "holidays" to "schedule exceptions" in the admin (separate follow-up).

🤖 Generated with Claude Code

Step 1 of the pre-deck work agreed on 2026-09-25 (grilling session after the #89–#94 merges). Decisions below are settled. ## Problem The facility can already declare a closed day: a weekday unchecked in the weekly schedule (`occupancy_daily_schedule.is_open = 0`) or a dated entry marked closed (`occupancy_holidays.is_open = 0`). Statistics ignore it. A closed day with no counted data makes its week/month a **Partial Period** exactly like an outage, and a closed day with staff passages is counted as a normal business day. ## Decisions - New glossary term **Closed Day**: a business day on which the facility's schedule declares it closed to the public, through its weekday schedule or a dated exception. It is not a business day for statistics. _Avoid_: holiday (a holiday may be open with its own hours), outage (missing data on an open day). - A Closed Day is excluded from `business_days`, so it never makes a period partial and never lowers the daily average. - Its counted passages (guards, staff) stay stored and visible in operations views, but do not enter statistics figures: period visitors/egress, daily average, busiest/best day, highest peak, weekend share, entrance totals and shares. - It is never a Usual Weekday Baseline sample. - Selecting a Closed Day directly: the summary returns a closed status instead of KPIs (no 404/422 surprise for the deck). - Picker quality and daily rows expose it: `closed_days` on `PeriodQuality`, `is_closed` on `DailyStatistics`. - Comparisons keep comparing totals; the badge explains fewer business days. - Closure resolution uses the same precedence as the live schedule: a dated entry overrides the weekday schedule. ## Out of scope - Calibration treatment of Closed Days (separate follow-up). - Renaming "holidays" to "schedule exceptions" in the admin (separate follow-up). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gabogg/hikcentral#103
No description provided.