Resolves which program was active at a given timestamp.
End dates are derived from the next program's start date.
The last program is treated as open-ended.
Uses resolveISODate (rather than new Date(...)) so date-only strings like
"2024-02-01" are interpreted consistently in the default facility timezone
rather than the server's local TZ — without this, program-interval boundaries
drift up to a day depending on where the server runs.
Resolves which program was active at a given timestamp. End dates are derived from the next program's start date. The last program is treated as open-ended.
Uses
resolveISODate(rather thannew Date(...)) so date-only strings like"2024-02-01"are interpreted consistently in the default facility timezone rather than the server's local TZ — without this, program-interval boundaries drift up to a day depending on where the server runs.