types/moment
Types
A finite moment of time represented as simple start and end integers.
Constructors
-
Moment { start: Int, end: Int }
A finite list of moments of time.
Alias
Moments = List<Moment>
Functions
Shifts a moment by some integer amount. This is great for incrementing a fixed moment of time, maybe like an epoch boundary by five days.
moment.shift(this_moment, a_day)
Check if a moment data structure is logical.
moment.is_logical(datum.moment)
Check if a validity range is contained within some moment. This assumes inclusivity.
|start–|lower––upper|–end|
moment.is_contained(datum.moment, this_tx.validity_range)
Check if a validity range of a tx is after a moment. This assumes exclusivity.
|start––end|–|lower––upper|
moment.is_after(datum.moment, this_tx.validity_range)