R/Dates.r

Defines functions is.Date

Documented in is.Date

setOldClass("Date")

#' Is x a Date object?
#'
#' @export is.Date
#' @param x an R object
#' @return TRUE if x is a Date object, FALSE otherwise.
#' @seealso [is.instant()], [is.timespan()], [is.POSIXt()]
#' @keywords logic chron
#' @examples
#' is.Date(as.Date("2009-08-03")) # TRUE
#' is.Date(difftime(now() + 5, now())) # FALSE
is.Date <- function(x) is(x, "Date")

Try the lubridate package in your browser

Any scripts or data that you put into this service are public.

lubridate documentation built on Nov. 17, 2017, 6:56 a.m.