A class to deal with intervals. Tested with numeric intervals and datetime intervals.