Skip to content

Dwell Ledger

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

The track is one zone’s local days, each cell as wide as that day really is: New York’s 10 March 2024 had 23 hours, so its cell is narrower. The bar is the elapsed time. Shaded cells are the dates the dwell touched, counted half-open: an exit exactly at local midnight does not touch the new day. The output is the real dwellTime call for what is on screen.

1. Place a dwell on the local-day grid

A container gates in at 23:00 and out at 01:00 in New York. Two hours elapsed, and it was there on two local dates.

2. What dwellTime returns

 

Worth trying: the same two instants in London and Amsterdam. The bar is identical on both rows, and the count is two days in London and one in Amsterdam, because Amsterdam’s midnight falls before the entry. Then drop the zone: two bare instants name no place, an offset is not a zone, and dwellTime returns null rather than guess.

Reference: dwellTime counts the days across the zone’s real transitions; floorToZone finds the start of any local day. The rules are in Transport: Legs and Dwell.