Skip to content

Cut-off Stack

  • Legs, dwell, cut-offs and punctuality, shared by road, rail, sea and air.

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.

1. The sailing and its cut-offs

The ship sails from Rotterdam at 18:00 on Monday 17 June 2024. Gate-in two days before lands on Saturday, so the preceding roll moves it back to Friday 17:00. Documents three days before is already Friday.

Cut-off 1
Cut-off 2
Cut-off 3
Cut-off 4
Closed days
Weekend

ISO dates, separated by commas

A roll moves a cut-off off a closed day: preceding back to the last open day, following on to the next. The two modified forms turn round when that would leave the month. none leaves it where it is.

There is no default: a calendar without a roll, or a roll without a calendar, returns [].

2. When each cut-off closes

Cut-offRuleClosesBefore departureMoved

3. What cutoffSchedule returns

 

Worth trying: a calendar with no roll: there is no default — the calendar closes the weekend, but no roll says which way to move a cut-off, so the stack is []. Then a Thursday holiday — 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 computes the whole stack; each entry is cutoffAt, and a roll moves a closed day the way rollDate moves it. See the Cut-off Ruler for one cut-off read three ways, and the guide’s whole-stack section and closures section.