protected function setRequestDate($request, array $handler)
    {
        if (!empty($handler['query']['date']) && count($handler['query']['date']) == 2) {

            list($from, $to) = $handler['query']['date'];

            $date = new \Google_Service_AnalyticsReporting_DateRange;
            $date->setStartDate($from);
            $date->setEndDate($to);

            $request->setDateRanges($date);
        }
    }