code: protected boolean folderWithinAllowedPeriod(Path inputFolder, DateTime folderTime) {
      DateTime currentTime = new DateTime(this.timeZone);
      PeriodFormatter periodFormatter = getPeriodFormatter();
      DateTime earliestAllowedFolderTime = getEarliestAllowedFolderTime(currentTime, periodFormatter);
      DateTime latestAllowedFolderTime = getLatestAllowedFolderTime(currentTime, periodFormatter);
  
      if (folderTime.isBefore(earliestAllowedFolderTime)) {
        log.info(String.format("Folder time for %s is %s, earlier than the earliest allowed folder time, %s. Skipping",
            inputFolder, folderTime, earliestAllowedFolderTime));
        return false;
      } else if (folderTime.isAfter(latestAllowedFolderTime)) {
        log.info(String.format("Folder time for %s is %s, later than the latest allowed folder time, %s. Skipping",
            inputFolder, folderTime, latestAllowedFolderTime));
        return false;
      } else {
        return true;
      }
    }
docs: Return true iff input folder time is between compaction.timebased.min.time.ago and
  compaction.timebased.max.time.ago.