interval: Calculate period between two dates

View source: R/calculation_definitions.R

intervalR Documentation

Calculate period between two dates

Description

Create an interval between the date_a and date_b

Usage

interval(date_a, date_b, unit = "none")

Arguments

date_a

vector of dates

date_b

vector of dates

unit

"none" or "month". if "month", convert all years to months

Details

can return 'negative' numbers returns NA if either of date_a or date_b is NA returns an arbitrarily large number of years (Inf) if min(date_a, date_b) is -Inf

Value

period(s) in $year, $month and $day


DavidPatShuiFong/dMeasure documentation built on Aug. 2, 2024, 11:45 p.m.