Calculate the number of days between two provided dates.

rvn_num_days(date1, date2)

Arguments

date1

first day, date format

date2

second day, date format

Value

int

number of days between the two days

Details

This method handles leap years if they exist between the specified dates.

See also

rvn_num_days_month for calculating the number of days in a month

Examples

rvn_num_days(as.Date("2017-02-05"),as.Date("2017-02-12"))
#> [1] 7
# 7