code: private function getPeriod($period)
      {
          /* get current month as MONTH period */
          if (!$period) {
              $month = $this->hlpPeriod->getPeriodCurrent(null, 0, \Praxigento\Core\Api\Helper\Period::TYPE_MONTH);
              /* get current date then get yesterday date as end of period */
              $begin = $this->hlpPeriod->getPeriodFirstDate($month);
              $today = $this->hlpPeriod->getPeriodCurrent();
              $end = $this->hlpPeriod->getPeriodPrev($today);
          } else {
              $month = $period;
              $begin = $this->hlpPeriod->getPeriodFirstDate($month);
              $end = $this->hlpPeriod->getPeriodLastDate($month);
          }
          $result = [$begin, $end];
          return $result;
      }
docs: Return 2 dates (period being/end): first day of the month and yesterday.
  
  @param string|null $period 'YYYYMM'
  @return array