The date_range aggregation query defines a set of date-ranges that represents a bucket. Only
documents with properties of type ‘DateTime’ will considered in the date_range aggregation buckets.
Here’s a list of properties:

field (string)

The property path.

format (string)

The date-format of which the buckets will be formatted to on return. Default to YYYY-MM-DDThh:mm:ssTZD.

ranges (range[])

The range-buckets to create.

range (from: number, to: number)

Defines a range to create a bucket for. From-value is included in bucket, to is excluded. The
from and to follows a special date-math explained below.