# Cut-off Stack

Industry: Transport

**Key point — the cut-offs before a sailing**

Every cut-off counts back from one event, so every deadline moves when that event moves. When the departure is rescheduled, one call recomputes every cut-off.

The stack counts back from one event — a sailing, a flight, a loading.
`cutoffSchedule` computes each named cut-off with `cutoffAt` against that one
anchor and returns the stack sorted earliest first.

A roll moves a cut-off that lands on a closed day to an open day, earlier or
later, as you choose. Nothing moves without one. A weekend or holiday calendar
with no roll, or a roll with no calendar, has no default, and `cutoffSchedule`
returns `[]` rather than guess which way to move it.

**Worth trying:** [a calendar with no roll: there is no
default](/gmt/tools/cutoff-stack/?w=cutoffstack&wa=%7B%22anchor%22%3A%222024-06-17T18%3A00%3A00%2B02%3A00%5BEurope%2FAmsterdam%5D%22%2C%22timeZone%22%3A%22Europe%2FAmsterdam%22%2C%22cutoffCount%22%3A%222%22%2C%22name1%22%3A%22gate-in%22%2C%22offset1%22%3A%22P2D%22%2C%22atLocalTime1%22%3A%2217%3A00%22%2C%22name2%22%3A%22documents%22%2C%22offset2%22%3A%22P3D%22%2C%22atLocalTime2%22%3A%2212%3A00%22%2C%22calendar%22%3A%22on%22%2C%22weekend%22%3A%226%2C7%22%7D) —
the calendar closes the weekend, but no roll says which way to move a cut-off,
so the stack is `[]`. Then [a Thursday
holiday](/gmt/tools/cutoff-stack/?w=cutoffstack&wa=%7B%22anchor%22%3A%222024-05-10T18%3A00%3A00%2B02%3A00%5BEurope%2FAmsterdam%5D%22%2C%22timeZone%22%3A%22Europe%2FAmsterdam%22%2C%22cutoffCount%22%3A%222%22%2C%22name1%22%3A%22gate-in%22%2C%22offset1%22%3A%22PT6H%22%2C%22name2%22%3A%22documents%22%2C%22offset2%22%3A%22P1D%22%2C%22atLocalTime2%22%3A%2212%3A00%22%2C%22calendar%22%3A%22on%22%2C%22weekend%22%3A%226%2C7%22%2C%22holidays%22%3A%222024-05-09%22%2C%22roll%22%3A%22preceding%22%7D) —
the documents cut-off moves back a day to Wednesday, while the gate-in cut-off,
six exact hours before departure, lands on an open day and does not move.

Reference: [`cutoffSchedule`](/gmt/reference/transport/calculate/cutoffSchedule/)
computes the whole stack; each entry is [`cutoffAt`](/gmt/reference/transport/calculate/cutoffAt/),
and a roll moves a closed day the way [`rollDate`](/gmt/reference/calendar/business/rollDate/)
moves it. See the [Cut-off Ruler](/gmt/tools/cutoff-ruler/) for one cut-off read
three ways, and the guide's
[whole-stack section](/gmt/guides/industries/transport-legs-and-dwell/#the-whole-stack-cutoffschedule)
and
[closures section](/gmt/guides/industries/transport-legs-and-dwell/#closures-roll-the-way-you-say).
