Compute what ParkPoint's pay machines charge: stays across midnight, a free grace period, a daily cap and an evening flat rate.
Stay length
Parse HH:MM times and compute the length of a stay, including across midnight.
The tariff
Grace period, started hours, daily cap and the evening flat rate, in integer cents.
Stays of several days
Support tickets with entry and exit dates, charging the cap per started day.
How to read a ticket, find what it doesn't say, ask good questions, and turn acceptance criteria into tests, with examples from realistic product tickets.
Bookings, shifts, diff hunks and time slots are intervals. Use half-open ranges, test overlap with one comparison, check clashes in O(log n), merge overlapping intervals and find free gaps.