Skip to contents

This function checks if the given object is of class POSIXct. It returns TRUE if the object inherits the POSIXct class, otherwise FALSE.

Usage

is.POSIXct(x)

Arguments

x

An object to be tested for POSIXct class inheritance.

Value

A logical value indicating if the input object is of class POSIXct.

Examples

x <- as.POSIXct("2021-01-01")
is.POSIXct(x) # TRUE
#> [1] TRUE

y <- Sys.Date()
is.POSIXct(y) # FALSE
#> [1] FALSE