1<?php 2 3namespace Elastica\Aggregation; 4 5/** 6 * Class DateRange. 7 * 8 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-daterange-aggregation.html 9 */ 10class DateRange extends Range 11{ 12 use Traits\MissingTrait; 13 14 /** 15 * Set the formatting for the returned date values. 16 * 17 * @param string $format see documentation for formatting options 18 * 19 * @return $this 20 */ 21 public function setFormat(string $format): self 22 { 23 return $this->setParam('format', $format); 24 } 25 26 /** 27 * Set time zone. 28 */ 29 public function setTimezone(string $timezone): self 30 { 31 return $this->setParam('time_zone', $timezone); 32 } 33} 34