IsDate: Check If an Object Is of Type Date

View source: R/DescTools.r

IsDateR Documentation

Check If an Object Is of Type Date

Description

Check if the given x is of any known Date type.

Usage

IsDate(x, what = c("either", "both", "timeVaries"))

Arguments

x

a vector or values to be checked.

what

can be any value out of "either" (default), "both" or "timeVaries".

Details

This checks for many known Date and Time classes: "POSIXt", "POSIXct", "dates", "times", "chron", "Date".

Value

logical vector of the same dimension as x.

Author(s)

Frank E Harrell

See Also

Year, Month, etc.

Examples

IsDate(as.Date("2013-04-10"))

IsDate(31002)

AndriSignorell/DescTools documentation built on Nov. 11, 2024, 12:11 p.m.