Skip to contents

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

Usage

is_date_or_datetime(x)

Arguments

x

The object to be tested.

Value

Scalar logical

Examples

#----------------------------------------------------------------------------
# is_date_or_datetime() examples
#----------------------------------------------------------------------------
library(bkbase)

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