duration(x, ...) ## S3 method for class 'POSIXcti':
duration(x, ...)
## S3 method for class 'POSIXctp':
duration(x, ...)
For time periods it returns a vector of integers indicating the duration of each time period using its own time unit. For instance :
duration(POSIXctp(1:2, c('month', 'year')))
> 1 2