listExcept static method

List<DateRange> listExcept(
  1. List<DateRange> source,
  2. List<DateRange> exceptions
)

Returns a list of DateRange objects that represent the difference between the source and exceptions lists.

This method calculates the ranges that are in the source list but not in the exceptions list.

source The list of DateRange objects to subtract from. exceptions The list of DateRange objects to subtract. Returns a new list of DateRange objects representing the difference.

Implementation

static List<DateRange> listExcept(List<DateRange> source, List<DateRange> exceptions) {
  return Range._listExcept(source, exceptions).map((r) => r as DateRange).toList();
}