Interval

Class INTERVAL deals with intervals between two instances of the same class which conform to ABSOLUTE (DATE, TIME, DATE_TIME). The notions of interval is directly linked with the notion of order.

The start_bound must be before the end_bound.

Creation

The features make, set_start_bound and set_end_bound take clones of their arguments, so that if these arguments are changed, the interval previously created is not.

It would have been possible to create intervals with references to date or time, but a modification of the dates would have been effective in the interval so that only the invariant would have been able to check if the start_bound is still before the end_bound.

Interval measurement

The measure of intervals is made by duration: the result is an instance of the class DURATION. However, as DURATION is the common parent of TIME_DURATION, DATE_DURATION and DATE_TIME_DURATION, it does not have many features available. Some features in class TIME, DATE, DATE_TIME return the same result and are more efficient to use. DURATION has to be use as the last solution.

Comparison

It includes intersection, inclusion and a special comparison.

Status Report

The main part of the functions need an argument from the same generic type and return a BOOLEAN value.

Element change

set_start_bound and set_end_bound are available to change the bounds.

Operations

Union and intersection are the mathematical functions. gather requires that two intervals meet each other and then yields the union.