docs: function sn_api_datum_loaderQueryRange(aggregate, aggregateTimeCount, endDate, minDate) {
      var end, start, timeUnit, timeCount, precision;
      function exclusiveEndDate(time, date) {
        var result = time.utc.ceil(date);
        if (result.getTime() === date.getTime()) {
          result = time.offset(result, 1);
        }
        return result;
      }
      function timeCountValue(propName) {
        var result;
        if (isNaN(Number(aggregateTimeCount))) {
          if (aggregateTimeCount[propName] !== undefined) {
            result = Number(aggregateTimeCount[propName]);
          } else {
            result = 1;
          }
        } else {
          result = aggregateTimeCount;
        }
        if (typeof result !== "number") {
          result = 1;
        }
        return result;
      }
      function precisionValue(agg) {
        var result = 10;
        if (agg.search(/^Five/) === 0) {
          result = 5;
        } else if (agg.search(/^Fifteen/) === 0) {
          result = 15;
        }
        return result;
      }
      if (aggregate.search(/Minute$/) >= 0) {
        timeCount = timeCountValue("numHours");
        timeUnit = "hour";
        end = exclusiveEndDate(d3.time.minute, endDate);
        precision = precisionValue(aggregate);
        end.setUTCMinutes(end.getUTCMinutes() + precision - end.getUTCMinutes() % precision, 0, 0);
        start = d3.time.hour.utc.offset(end, -timeCount);
      } else if (aggregate === "Month") {
        timeCount = timeCountValue("numYears");
        timeUnit = "year";
        end = exclusiveEndDate(d3.time.month, endDate);
        start = d3.time.year.utc.offset(d3.time.month.utc.floor(endDate), -timeCount);
      } else if (aggregate === "Day") {
        timeCount = timeCountValue("numMonths");
        timeUnit = "month";
        end = exclusiveEndDate(d3.time.day, endDate);
        start = d3.time.month.utc.offset(d3.time.day.utc.floor(endDate), -timeCount);
      } else {
        timeCount = timeCountValue("numDays");
        timeUnit = "day";
        end = exclusiveEndDate(d3.time.hour, endDate);
        start = d3.time.day.utc.offset(d3.time.hour.utc.floor(end), -timeCount);
      }
      if (minDate && start < minDate) {
        start = minDate;
      }
      return {
        start: start,
        end: end,
        timeUnit: timeUnit,
        timeCount: timeCount
      };
    }