I think this might cause a regression when passed missing values.
library(data.table)
yday(NA)
#> [1] 194
wday(NA)
#> [1] 3
mday(NA)
#> [1] 12
week(NA)
#> [1] 28
month(NA)
#> [1] 7
quarter(NA)
#> [1] 3
year(NA)
#> [1] 5881580
yearmon(NA)
#> [1] 5881581
yearqtr(NA)
#> [1] 5881581
data.table:::convertDate(NA_integer_, "yday")
#> [1] 194
data.table:::convertDate(NA_integer_, "year")
#> [1] 5881580