return (int)((interval_end - interval_start)/TimeUtils.MSEC_PER_DAY);
int value = (int)((interval_end - interval_start)/TimeUtils.MSEC_PER_DAY); if (value > bucketSize) { logger.error("bucket "+bucket+", Bucket start "+TimeUtils.dateString(bucket_start)+ ", end "+TimeUtils.dateString(bucket_end)); logger.error("Task start "+TimeUtils.dateString(start)+", end "+TimeUtils.dateString(end)); logger.error("Interval start "+TimeUtils.dateString(interval_start)+", end "+ TimeUtils.dateString(interval_end)); int b_end = convertTimeToBucket(end); logger.error("Calculated bucket end "+b_end+", task end "+TimeUtils.dateString(end)); } return value;
  private int getDaysSpanned(int bucket, long start, long end) {    long bucket_start = convertBucketToTime(bucket);    long bucket_end = bucket_start + MSEC_PER_BUCKET;    long interval_start = Math.max(start, bucket_start);    long interval_end = Math.min(end, bucket_end);    return (int)((interval_end - interval_start)/TimeUtils.MSEC_PER_DAY);  }