code: public final synchronized Date evalDateNextPeriodStart(
      final Map<String, Object> pAddParam,
        final Date pDateFor) throws Exception {
      EPeriod period = evalBalanceStorePeriod(pAddParam);
      if (!(period.equals(EPeriod.MONTHLY)
        || period.equals(EPeriod.WEEKLY)
          || period.equals(EPeriod.DAILY))) {
        throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER,
          "stored_balance_period_must_be_dwm");
      }
      Calendar cal = Calendar.getInstance(new Locale("en", "US"));
      cal.setTime(pDateFor);
      cal.set(Calendar.HOUR_OF_DAY, 0);
      cal.set(Calendar.MINUTE, 0);
      cal.set(Calendar.SECOND, 0);
      cal.set(Calendar.MILLISECOND, 0);
      if (period.equals(EPeriod.DAILY)) {
        cal.add(Calendar.DATE, 1);
      } else if (period.equals(EPeriod.MONTHLY)) {
        cal.add(Calendar.MONTH, 1);
        cal.set(Calendar.DAY_OF_MONTH, 1);
      } else if (period.equals(EPeriod.WEEKLY)) {
        cal.add(Calendar.DAY_OF_YEAR, 7);
        cal.set(Calendar.DAY_OF_WEEK, 1);
      }
      return cal.getTime();
    }
docs: <p>Evaluate date start of next balance store period.
  Tested in beige-common org.beigesoft.test.CalendarTest.</p>
  @param pAddParam additional param
  @param pDateFor date for
  @return Start of next period nearest to pDateFor
  @throws Exception - an exception