Consider allowing Date
s in place of epiranges, Date
s & hyphenated datestrings in epirange
s
#47
Labels
Date
s in place of epiranges, Date
s & hyphenated datestrings in epirange
s
#47
Currently,
Date
objects cannot be fed in as, e.g.,time_values
toepidatr::covidcast
, asDate
objects are not considered epirange-like, nor can they be used successfully as the endpoints of anepirange
. This is an inconvenience, as often we doDate
-based arithmetic or useSys.Date()
to arrive attime_values
of interest, and, furthermore, simply usingas.character
ortoString
doesn't always put them in the accepted format. (The hyphenated-string handling might require a little care due to hyphens being allowed to represent ranges between non-hyphenated-datestrings; hyphenated strings probably will need converted to non-hyphenated strings somewhere, and probably already are in the situations where they already work.)It'd be nice for all, not just some, of the queries below to work. [Providing more comprehensible and helpful error messages, if easier, could be a temporary patch (--- e.g., suggesting to use
format(dates, "%Y%m%d")
).]Created on 2022-09-27 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: