Period monthOf() in HK time + clear stale Inspect tx list on month change
What / Why¶
Two defects in the Inspect-Period flow (owner report 2026-06-18).
DONE (origin/nightly, NOT main)¶
- monthOf() now uses Asia/Hong_Kong (c7f69cc9) β
monthOf()was UTC-based whilemonthBounds()is HK-based, an asymmetry that mis-classified boundary txns: a tx whose UTC time is Aug-31 evening but whose HK wall-clock is Sep-1 was correctly EXCLUDED from August's Inspect list (HK bounds) but INCLUDED in August's period-close lock + auto-match gate (UTC monthOf). Result: closing August locked Sep-1-HK txns β "the period close moves to the first day of the next month." Fix:monthOfnow projects viadayjs.tzto Asia/Hong_Kong, matchingmonthBounds/hkMonthBounds. All call sites inherit it (assertPeriodOpen.server,isMonthClosed,autoMatchHelpers,PeriodsTabincorpMonth/nowMonth,BankTransactionsTabgetPeriodMonthKey). - Clear stale tx list on month change (c7f69cc9) β the Inspect-Period modal flashed the PREVIOUS month's transactions when the user opened a different month; now cleared.
- Codex P2 (7adc15c6) β date-only strings (
YYYY-MM-DD) are parsed through JSDate(UTC midnight per ECMA-262) before the.tz('Asia/Hong_Kong')projection, so a basis-period start of2026-01-01no longer re-displays as Dec 2025 in TZs ahead of HK (Tokyo/Sydney/ Auckland) β fixes the closed/total counters inAccountingOverview+ date-only guard sites.
tsc clean on current nightly. (Merged #748.)
Related¶
T-058 (fiscal-period UX / basis periods) Β· T-059 (AccountingOverview counters) Β· [[project_erl_incorporation]] (entityCalendar / HK basis periods)