The returned range is ordered from earliest to latest. The first element
represents the beginning of the requested date range and the second element
represents the end of the requested date range at the requested temporal
precision.
By default, the returned end time is one unit before the beginning of
enddate. For example:
dateRange(20190101, 20190102, timezone = "UTC")
[1] "2019-01-01 00:00:00 UTC"
[2] "2019-01-01 23:59:59 UTC"
Setting ceilingEnd = TRUE includes the entirety of enddate:
dateRange(
20190101,
20190101,
timezone = "UTC",
ceilingEnd = TRUE
)
[1] "2019-01-01 00:00:00 UTC"
[2] "2019-01-01 23:59:59 UTC"
The ceilingEnd argument addresses ambiguity in phrases such as
"August 1-8". With ceilingEnd = FALSE (default), the range extends
through the end of August 7, stopping at the midnight boundary where August 8
begins. With ceilingEnd = TRUE, the range
extends through the end of August 8.
Input dates are parsed with parseDatetime() using the specified
timezone.