Computes the difference in time between two Date-time values in a specified time 'unit'.

compute_time_elapsed(date_start = NULL, date_end = NULL, type = c("year",
  "month", "day", "hour"))

Arguments

date_start

Date-time (or character that can be converted to Date-time).

date_end

Date-time (or character that can be converted to Date-time).

type

character. 'unit' to use to calculate time difference. One of 'year', 'month', 'day', or 'hour'.

Value

numeric.

Details

Called in compute_timefilter_facet_at().

See also

https://stackoverflow.com/