is.DateLike: Check that input is a date

Description Usage Arguments Details Value Examples

Description

Test if input is a date-like object

Usage

1

Arguments

x

Input to test

Details

Test if input is one of my favorite date-like objects. In other words, a Date, or a POSIX*.

Value

Boolean

Examples

1
2
3
4
5
6
dtstr <- c("1969-08-03", "2011-06-24")

is.DateLike("AAA")
is.DateLike(251)
is.DateLike(as.Date(dtstr))
is.DateLike(strptime(dtstr, "\%Y-\%m-\%d"))

pchristi99/pcLib documentation built on June 25, 2019, 2:23 p.m.