Skip to main content

Module interval

Module interval 

Source
Expand description

The temporal.interval planner: coordinates a start/end/duration/open column group so closed rows satisfy end = start + duration exactly and open rows carry a coherent null/flag state.

§One instant, integer arithmetic

Every timestamp is reduced to a single internal UTC instant measured in nanoseconds since the Unix epoch (an i128), and every duration to an integer count of unit-sized nanoseconds. The interval equation end_ns = start_ns + duration_units * unit_nanos is therefore pure checked integer arithmetic — floats are used only to choose a duration from a distribution, never to compute the equation. Timezone is carried as rendering metadata: the instant is the same regardless of the zone it is rendered in, so the equation holds across DST boundaries by construction.

§Owned columns and streams

The planner owns the columns named under its columns: mapping (start/end/duration, plus an optional open flag). Each row draws the start instant, the open-state, and the duration from three separate stable seed streams, then derives the dependent columns rather than redrawing — so the open decision never perturbs the duration stream and a seeded run repeats exactly.

Structs§

TemporalIntervalFactory
Factory for the temporal.interval planner.

Statics§

TEMPORAL_INTERVAL_DESCRIPTOR
Static description of the temporal.interval planner.