ez.is.date.like | R Documentation |
check if a vector of char, number is convertiable to date type as.Date(as.character(x), format)
ez.is.date.like(x, format = "%m/%d/%Y", ...)
x |
a vector of char, number |
format |
specify date format. see examples |
... |
other parameters passed to as.Date(...) |
returns a vector of T/F (vectorized because of is.na() used).
ez.date
ez.is.date
ez.is.date.like
ez.age
ez.time
mydate = c("10/11/2012","10-12-2012", 345)
# format one of c("%d/%m/%Y", "%d-%m-%Y", "%Y/%m/%d", "%m/%d/%Y", "%Y-%m-%d"). %y for two year digits
ez.is.date.like(mydate, format = "%m/%d/%Y") # T F F
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.