View source: R/CountingDates.R
difftime_leap_year | R Documentation |
Function to count the number of days between two dates. Optional parameters to count without the leap-days.
difftime_leap_year(tfinal, tinitial, leapDatesIn = TRUE)
tfinal |
Final date. |
tinitial |
Initial date. |
leapDatesIn |
If TRUE count leap Dates, else exclude from counting. |
Number of days between the specified dates.
Julian Chitiva and Diego Jara
#Function accepts Dates as Dates or as characters.
difftime_leap_year(tfinal='2023-03-05',tinitial='2019-02-28',leapDatesIn=TRUE)
difftime_leap_year(tfinal=as.Date('2023-03-05'),tinitial=as.Date('2019-02-28'),leapDatesIn=TRUE)
difftime_leap_year(tfinal='2023-03-05',tinitial='2019-02-28',leapDatesIn=FALSE)
difftime_leap_year(tfinal='2023-03-05',tinitial=as.Date('2019-02-28'),leapDatesIn=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.