You may or may not want to implement this but just wanted to point out that as.Date in base R and ymd in lubridate both ignore junk at the end if you don't supply a format.
as.Date("2000-01-02junk")
## [1] "2000-01-02"
library(ymd)
ymd("2000-01-02junk")
## [1] NA
You may or may not want to implement this but just wanted to point out that
as.Date
in base R andymd
in lubridate both ignore junk at the end if you don't supply a format.