DateRange.php 510 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Elastica\Aggregation;
  3. /**
  4. * Class DateRange.
  5. *
  6. * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-daterange-aggregation.html
  7. */
  8. class DateRange extends Range
  9. {
  10. /**
  11. * Set the formatting for the returned date values.
  12. *
  13. * @param string $format see documentation for formatting options
  14. *
  15. * @return $this
  16. */
  17. public function setFormat($format)
  18. {
  19. return $this->setParam('format', $format);
  20. }
  21. }