// If we're doing date bounds checking, check if facet is entirely outside the time bounds of this date
// If so, throw an exception so this facet isn't returned. Otherwise potentially trim the start and end times
if(doDateBoundsCheck) {
if (activity.end<dateStart || activity.start>dateEnd) {
throw new OutsideTimeBoundariesException();
}
// We know this facet overlaps the time bounds of date, check if it needs
// to be truncated.
if(activity.start<dateStart){