date_checker {stppSim} | R Documentation |
Date (Format) Checker
Description
Checks if date is in a
specified format (i.e. 'yyyy-mm-dd'
).
Usage
date_checker(x)
Arguments
x |
A date or a vector of date values |
Details
Returns "TRUE"
if all
date entries are in the specified format
("yyyy-mm-dd
),
and FALSE
if at least one date is not
in the format.
Value
Returns TRUE or FALSE
Examples
date_list_1 <- c("2021-09-12", "2016-xx-02",
"09/08/2012")
date_checker(date_list_1)
#> FALSE (Entries 2 and 3
#are incorrect date inputs)
date_list_2 <- c("2021-09-12", "1998-03-09")
date_checker(date_list_2)
#> TRUE
[Package stppSim version 1.3.4 Index]