R/count_calendar_units.R
count_calendar_units.RdCounts the number of complete calendar units (years, months, or days) between two date-time values, rounding down to the nearest whole unit.
count_calendar_units(x, y, unit = c("years", "months", "days"), floor = TRUE)A date-time representing the start of the interval.
A date-time representing the end of the interval.
A character string specifying the calendar unit to count.
One of "years", "months", or "days".
floor A logical scalar. If TRUE (default), the result is rounded
down to the nearest whole integer.
An integer giving the number of complete calendar units between
x and y.