Skip to content
Prev 59209 / 398502 Next

Time difference in months? (difftime, units)

On Wed, 17 Nov 2004, Andy Bunn wrote:

            
Ah, but months are of variable length.
Pretty easy: convert to POSIXlt, then use something like

12*x$year + x$month

and subtract those.  You could set up a class for "months" and have 
as.months and a `-' method ....