% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class.r
\name{is.datetype}
\alias{is.datetype}
\alias{is.Date}
\alias{is.POSIXt}
\alias{is.POSIXct}
\alias{is.POSIXlt}
\title{Is object of a Date type?}
\usage{
is.datetype(x)

is.Date(x)

is.POSIXt(x)

is.POSIXct(x)

is.POSIXlt(x)
}
\arguments{
\item{x}{an \strong{R} object.}
}
\value{
\code{TRUE} or \code{FALSE}.
}
\description{
Tests if an object inherits from some/all of \strong{R}'s date types:
\code{Date}, \code{POSIXt}, \code{POSIXct} and \code{POSIXlt}.
}
\details{
\code{is.datetype} checks if the object inherits from either \code{Date} or \code{POSIXt}.

\code{is.Date} checks if the object inherits from \code{Date}.

\code{is.POSIXt} checks if the object inherits from \code{POSIXt}.

\code{is.POSIXct} checks if the object inherits from \code{POSIXct}.

\code{is.POSIXlt} checks if the object inherits from \code{POSIXlt}.
}
\examples{
a <- "2020-01-01"
b <- as.Date("2020-01-01")
c <- 123

is.Date(a)
is.Date(b)
is.Date(c)

is.Date(as.POSIXct(a))
is.POSIXt(as.POSIXct(a))
is.POSIXct(as.POSIXct(a))
is.POSIXlt(as.POSIXct(a))
is.datetype(as.POSIXct(a))
}
\seealso{
\link{as.Date}, \link{as.POSIXct}, \link{as.POSIXlt}.
}
