yint: get interval as fraction of full years

Description Usage Arguments Value

View source: R/utils.R

Description

Either assume 365 days in the year, or get the precise duration.

Usage

1
2
yint(Day1, Month1, Year1, Day2, Month2, Year2, reproduce.matlab = FALSE,
  detect.mid.year = TRUE, detect.start.end = TRUE)

Arguments

Day1

Day of first date

Month1

Month of first date

Year1

Year of first date

Day2

Day of second date

Month2

Month of second date

Year2

Year of second date

reproduce.matlab

logical. default FALSE. Assume 365 days in all years?

detect.mid.year

logical. default TRUE. Should June 30 and July 1 be considered .5?

detect.start.end

logical. default TRUE. Should Jan 1 always be 0 and Dec 31 always be 1?

Value

decimal value of year fraction (can be greater than 1)


DDM documentation built on May 2, 2019, 6:16 a.m.

Related to yint in DDM...