/// <summary> /// Creates a new timespan interval based on the provided datetimeoffset interval. /// </summary> /// <param name="obj">DateTimeOffset interval to use when creating a new TimeSpan interval</param> /// <returns>TimeSpan interval</returns> /// <remarks> /// The timeSpan interval will use the DateTimeOffsets intervals Start TimeoFDay as a startvalue and use the Start TimeOfDay plus the duration of the interval as the stopvalue /// </remarks> public static IInterval <TimeSpan> ToTimeSpanInterval(this IInterval <DateTimeOffset> obj) { return(new Interval <TimeSpan> ( start: obj.Start.TimeOfDay, stop: obj.Start.TimeOfDay + obj.Duration() )); }