public function getPeriodFirstDate($periodValue)
    {
        $result = $periodValue;
        if ($this->isPeriodYear($periodValue)) {
            $dt = date_create_from_format('Y', $periodValue);
            $ts = strtotime('first day of January', $dt->getTimestamp());
            $dt = $this->toDateTime($ts);
            $result = date_format($dt, 'Ymd');
        } else {
            if ($this->isPeriodMonth($periodValue)) {
                $dt = date_create_from_format('Ymd', $periodValue . '01');
                $ts = strtotime('first day of', $dt->getTimestamp());
                $dt = $this->toDateTime($ts);
                $result = date_format($dt, 'Ymd');
            }
        }
        return $result;
    }