is.POSIXlt {str2str}R Documentation

Test for a POSIXlt object

Description

is.POSIXlt returns whether an object is a POSIXlt object (aka has class = "POSIXlt").

Usage

is.POSIXlt(x)

Arguments

x

an object.

Value

TRUE is x has class "POSIXlt" and FALSE if x does not have class "POSIXlt".

Examples

time <- as.POSIXlt("2021-05-24 21:49:11", tz = "America/New_York",
   format = "%Y-%m-%d %H:%M:%OS") # as.POSIXlt.character
is.POSIXlt(time)
class(time) <- append(class(time), "extra_class")
is.POSIXlt(time) # classes other than POSIXlt are allowed
is.POSIXlt(list(time)) # returns FALSE

[Package str2str version 1.0.0 Index]