Kurt\Google\Analytics\Period::getStartDate PHP Method

getStartDate() public method

Gets the Starting date of the period.
public getStartDate ( ) : Carbon\Carbon
return Carbon\Carbon
    public function getStartDate()
    {
        return $this->startDate;
    }

Usage Example

 /**
  * Execute the query by merging arrays to current ones.
  *
  * @param array $parameters
  *
  * @return $this
  */
 public function execute($parameters = [], $parseResult = true)
 {
     $this->validateViewId();
     $this->mergeParams($parameters);
     /*
      * A query can't run without any metrics.
      */
     if (!$this->metricsAreSet()) {
         throw new UndefinedMetricsException();
     }
     $result = $this->service->data_ga->get($this->viewId, $this->period->getStartDate()->format('Y-m-d'), $this->period->getEndDate()->format('Y-m-d'), $this->getMetricsAsString(), $this->getOptions());
     if ($parseResult) {
         return $this->parseResult($result);
     }
     return $result;
 }