daterange
The daterange
type stores a lower and upper value of a date range. Either one can be omitted to store an open range.
API
The API uses an object with from and to for the daterange type:
Parsing of the dates works the same as for the date, datetime
type. Thus, a daterange
can store the full set of widths available for the dates in fylr. The shortest date is the year and the longest the full time including a timezone with seconds.
Alongside with the date values, a textual value for the daterange
can be set. The format of the text property matches the format of the text_l10n type.
Index
The index works the same as for the date, datetime
type. Internally fylr always works with date ranges to store values.
Alongside with the from
and to
values, a from_to
value is stored which allows for aggregations using the middle value of a date. To aggregate over the range, fylr additionally stores a range
value which consists of all values between the lower and upper limit. fylr stores all years, months and days found in between the lower and upper value of the range, resp. If the date has the width year
, all years in between are stored for aggregations. E.g. for the above example, the dates 2001-01-01 00:00:00, 2002-01-01 00:00:00, ..., 2010-01-01 00:00:00
.
Sorting
Sorting works the same as described in for the date, datetime
type.
Export
The XML Export for the above example looks like this:
The JSON exports the data like this:
CSV exports like this:
2001
2010
Die erste Dekade im neuen Millennium
The first decade in the new millenium
Last updated