docs: private Date adjustForWholeDay(Date date, boolean isEnd) {
  
          Calendar result = new GregorianCalendar();
          result.setTime(date);
          result.set(Calendar.HOUR_OF_DAY, 0);
          result.set(Calendar.MINUTE, 0);
          result.set(Calendar.SECOND, 0);
          result.set(Calendar.MILLISECOND, 0);
          if (isEnd) {
              result.add(Calendar.DATE, 1);
          }
  
          return result.getTime();
      }