Skip to contents

Returns TRUE if x is a datetime (class POSIXct).

Usage

is_datetime(x)

Arguments

x

The object to be tested.

Value

Scalar logical

Examples

#----------------------------------------------------------------------------
# is_datetime() examples
#----------------------------------------------------------------------------
library(bkbase)

dt <- as.POSIXct("2019-01-01")
d <- as.Date("2019-01-01")
is_datetime(dt)
#> [1] TRUE
is_datetime(d)
#> [1] FALSE