R/util.R

validaFecha <- function(fechaString) {
  res <- try(as.Date(fechaString, format = "%Y-%m-%d"))
  if(class(res) == "try-error" || is.na(res))
    stop("Incorrect date format. The submitted date format is incorrect. It must be yyyy-mm-dd.")
}

Try the siebanxicor package in your browser

Any scripts or data that you put into this service are public.

siebanxicor documentation built on May 2, 2019, 9:13 a.m.