# logistics.delivery-date
The "order in the next 2 hours for delivery on Thursday" calculation. An
order goes out the same day when it is placed on a working day strictly before
the cut-off time; otherwise it goes out on the next working day. Delivery is
`serviceDays` working days after dispatch, so 1 is next-day delivery and 0 is
same-day.
Working days are Monday to Friday, less the UK bank holidays of `region`
(from `dates.bank-holidays`) and any `closures` the caller adds. The
arithmetic is `dates.add-business-days`.
## Decisions
- **Before, not at.** An order at 15:00 exactly misses a 15:00 cut-off,
matching "order before 3pm". Times are the warehouse's local clock, HH:MM
in 24 hours; converting a customer's time zone is the caller's job.
- **Weekend and holiday orders** are dispatched on the next working day
whatever the time.
- **Holidays in the right years.** Bank holidays are loaded for the order's
year and then for each later year the estimate reaches, so an order on 31
December skips New Year's Day. An estimate that reaches a year gov.uk has
not published yet is an error from `dates.bank-holidays` rather than a
guess that treats unknown holidays as working days.
- **One calendar for both ends.** The same working days apply to dispatch and
delivery. A carrier that delivers on Saturdays, or a delivery into a region
with different holidays, needs its own call or its own `closures`.
- **An estimate, not a promise.** It knows nothing about carrier delays,
remote-area surcharges, or the actual collection time.
## Sources
UK bank holidays: gov.uk, https://www.gov.uk/bank-holidays (via
`dates.bank-holidays`).