difftime_leap_year: difftime_leap_year

View source: R/CountingDates.R

difftime_leap_yearR Documentation

difftime_leap_year

Description

Function to count the number of days between two dates. Optional parameters to count without the leap-days.

Usage

difftime_leap_year(tfinal, tinitial, leapDatesIn = TRUE)

Arguments

tfinal

Final date.

tinitial

Initial date.

leapDatesIn

If TRUE count leap Dates, else exclude from counting.

Value

Number of days between the specified dates.

Author(s)

Julian Chitiva and Diego Jara

Examples

#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)


quantdates documentation built on July 4, 2024, 9:07 a.m.