Hi all,

Please, how could I calculate the time that two time segments has in common? Is there any function to perform this calculation?

For instance, given four POSIXlt objects...

endPeriod<-as.POSIXlt("2008-09-30")
startPeriod<-as.POSIXlt("2007-10-01")
endProject<-as.POSIXlt("2007-05-31")
startProject<-as.POSIXlt("2006-12-01")

that limit two time segments...

project <- as.numeric(endProject-startProject)
period <- as.numeric(endPeriod-startPeriod)

How could I calculate the time project and period overlap?

Thanks for your help!

Ricardo



--
Ricardo Rodríguez
Your XEN ICT Team

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to