data.table::yearqtr("2025-12-31")
#[1] 2025.75
data.table::yearqtr(as.Date("2025-12-31"))
#[1] 2025.75
there could be new argument format = c("numeric", "character") and the latter one would produce
2025Q1
2025Q2
2025Q3
2025Q4
so commonly used format
current workaround is to have wrapper
paste(data.table::year("2025-12-31"), data.table::quarter("2025-12-31"), sep = "Q")