public static IEnumerable <DateRange> Subtract(this IEnumerable <DateRange> ranges, DateRange toSubtract) { return(ranges.SelectMany(range => range.Subtract(toSubtract))); }
public static IEnumerable <DateRange> Intersect(this IEnumerable <DateRange> source, DateRange value) { return(source.Select(range => range.Intersect(value)).SkipNulls()); }