Learn R Programming

lubridate (version 1.9.3)

is.timespan: Is x a length of time?

Description

Is x a length of time?

Usage

is.timespan(x)

Value

TRUE if x is a period, interval, duration, or difftime object, FALSE otherwise.

Arguments

x

an R object

See Also

is.instant(), is.duration(), is.difftime(), is.period(), is.interval()

Examples

Run this code
is.timespan(as.Date("2009-08-03")) # FALSE
is.timespan(duration(second = 1)) # TRUE

Run the code above in your browser using DataLab