code: function handleBrushEnd() {
              if (!d3Selection.event.sourceEvent) {
                  return; // Only transition after input.
              }
  
              let dateExtentRounded = [null, null];
              const selection = d3Selection.event.selection;
  
              if (selection) {
                  let dateExtent = selection.map(xScale.invert);
  
                  dateExtentRounded = dateExtent.map(timeIntervals[roundingTimeInterval].round);
  
                  // If empty when rounded, use floor & ceil instead.
                  if (dateExtentRounded[0] >= dateExtentRounded[1]) {
                      dateExtentRounded[0] = timeIntervals[roundingTimeInterval].floor(dateExtent[0]);
                      dateExtentRounded[1] = timeIntervals[roundingTimeInterval].offset(dateExtentRounded[0]);
                  }
  
                  d3Selection.select(this)
                      .transition()
                      .call(d3Selection.event.target.move, dateExtentRounded.map(xScale));
              }
  
              dispatcher.call('customBrushEnd', this, dateExtentRounded);
          }
docs: Processes the end brush event, snapping the boundaries to days
  as showed on the example on https://bl.ocks.org/mbostock/6232537
  @return {void}
  @private