I am new to lubridate
. I tried to calculate the difference between two sets of time with lubridate
but get slight different answers for interval, duration, and period
library(lubridate)
a <- dmy_hms("9/7/1988 4:30:00")
b <- dmy_hms("2/11/2019 4:30:00")
c <- a %--% b
per <- as.period(c)
dur <- as.duration(c)
time_length(c, unit = "year") #31.31694
time_length(per, unit = "year") #31.33716
time_length(dur, unit = "year") #31.33699