yint {DDM}R Documentation

get interval as fraction of full years

Description

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

Usage

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)


[Package DDM version 1.0-0 Index]