validDate | R Documentation |
Description: Validates and converts date formats to standard R date format This function processes a character or a vector of characters to verify the date format and transform it into a standard R date format. If the format cannot be automatically determined, you can provide a format string as a parameter.
validDate(datevar, format = NULL, dropFuture = TRUE)
datevar |
A character vector to be converted into a Date vector. |
format |
An optional format string to use instead of the automatic system. Useful for complex formats. |
dropFuture |
Logical value. If TRUE and a 2 digit year in the futur (greater than system date), it will be placed in the past by substrating one century . Default is TRUE. |
A Date object or a vector of Date objects in standard R date format.
STRAP team strap@epiconcept.fr
For more details see the link below to access the vignette:
vignette("epiuf_package")
validDate("2023-05-25")
validDate(c("20221120","20210615","20210303","",NA))
validDate(c("05-25-2023", "26/05/2023"), format = "%m-%d-%Y")
validDate(datevar = "15/01/60",dropFuture = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.