Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Arguments

x

an R object

Value

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

See Also

Examples

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

lubridate

Make Dealing with Dates a Little Easier

v1.7.10
GPL (>= 2)
Authors
Vitalie Spinu [aut, cre], Garrett Grolemund [aut], Hadley Wickham [aut], Ian Lyttle [ctb], Imanuel Costigan [ctb], Jason Law [ctb], Doug Mitarotonda [ctb], Joseph Larmarange [ctb], Jonathan Boiser [ctb], Chel Hee Lee [ctb], Google Inc. [ctb, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.