public static TimeSpan DurationOfIntersect(this IInterval i, IInterval j) => i.Intersect(j).Match(x => x.Duration, () => TimeSpan.Zero);
public static bool Intersects(this IInterval i, IInterval j) => i.Intersect(j).HasValue;
public static bool Covers(this IInterval interval, IInterval other) => interval.Intersect(other).Match(x => x.ToInterval().Equals(other), () => false);