powered by
A convenience function which is simply as.numeric(end_date - start_date)
as.numeric(end_date - start_date)
number_of_days(x, start)
A numeric variable containing the number of days between the two dates
numeric
The end date with class Date
Date
The start date with class Date
library(lubridate) number_of_days(x = ymd("2021-01-05"), start = ymd("2020-12-28"))
Run the code above in your browser using DataLab