Consecutive or overlapping date ranges are summarised into a single date range, non-consecutive date
ranges are kept as is.
Usage
summarise_dates(x_start, x_end, range_operator = " to ", collapse = TRUE)
Arguments
- x_start
vector of period starting dates.
- x_end
vector of period ending dates.
- range_operator
string to go between the start and end date, defaults to " to ".
- collapse
boolean to collapse all dates into one comma separated string, defaults to TRUE.
Value
vector or single string of summarised date ranges.