mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
The briefing payload states how far off a checkup is as a bare number the model narrates back: "due in N days", "overdue by N days". It got that number by dividing the hour gap by twenty-four, which answers a different question than the one the sentence asks. A checkup booked for nine this morning came out "overdue by 0 days" by the evening. One due Sunday at 01:00, read late on Friday, came out one day off — Saturday, on a calendar where it is two. A clock-change day is twenty-three or twenty-five hours long and rounded whichever way its length pushed it. The checkup screens had exactly this and it was fixed there, so the counting already exists. Lift it out as `calendarDaysUntil` and have both the phrase and the number come off it, rather than leaving the payload with a second body that can drift again. It counts by differencing two integer day indices read on the person's profile clock, so the answer is exact rather than rounded, and `extractFeatures` resolves that zone and hands it down — the number now agrees with the screen the person is looking at. Today's checkup moves off the overdue list, where the hour gap had put it as soon as its appointment time passed. The hour it was booked for may be behind, but the day it belongs to is not. The horizon that bounds the read stays an hour cutoff on purpose. It is a query bound, not a statement to anyone about which day something falls on.