Map dates to time steps
Value
Integer step indices (1..n_steps), NA for missing or
unreadable dates and for dates outside the window.
Examples
tf <- time_frame("2020-01", "2020-12")
time_index(tf, as.Date(c("2020-01-15", "2020-12-31", "2021-01-01")))
#> [1] 1 12 NA
