code: public PartitionSize getSize(Date first, Date last, int maxP) {
  		long diffMS = last.getTime() - first.getTime();
  		for(PartitionSize pa : sizes) {
  			long maxMS = maxP * pa.intervalMS();
  			if(maxMS > diffMS) {
  				return pa;
  			}
  		}
  		return twoYearSize;
  	}
docs: Attempt to find the smallest PartitionSize implementation which, spanning
  the range first and last specified, produces at most maxP partitions.
  @param first Date of beginning of time range
  @param last Date of end of time range
  @param maxP maximum number of Partitions to use
  @return a PartitionSize object which will divide the range into at most
  maxP Partitions