The LAST date, walking forward through dates, that a physician has
PLANNED without a gap longer than maxGapDays.
"Without a gap" is the point: a rota with Mondays booked out for a year but
nothing else is not a covered schedule, and reporting the far Monday would
tell a physician they were done when they had published one day a week.
A day is planned when it publishes hours OR carries time off: a deliberate
day off is a decision about that date, not a hole in the rota, and a
Mon–Fri physician taking a Monday off must not read as "your schedule stops
on Friday". Days with neither are the gaps that count.
The LAST date, walking forward through
dates, that a physician has PLANNED without a gap longer thanmaxGapDays."Without a gap" is the point: a rota with Mondays booked out for a year but nothing else is not a covered schedule, and reporting the far Monday would tell a physician they were done when they had published one day a week.
A day is planned when it publishes hours OR carries time off: a deliberate day off is a decision about that date, not a hole in the rota, and a Mon–Fri physician taking a Monday off must not read as "your schedule stops on Friday". Days with neither are the gaps that count.