Learn R Programming

lubridate (version 1.8.0)

is.instant: Is x a date-time object?

Description

An instant is a specific moment in time. Most common date-time objects (e.g, POSIXct, POSIXlt, and Date objects) are instants.

Usage

is.instant(x)

is.timepoint(x)

Value

TRUE if x is a POSIXct, POSIXlt, or Date object, FALSE otherwise.

Arguments

x

an R object

See Also

is.timespan(), is.POSIXt(), is.Date()

Examples

Run this code
is.instant(as.Date("2009-08-03")) # TRUE
is.timepoint(5) # FALSE

Run the code above in your browser using DataLab