charlatan
charlatan copied to clipboard
DateTimeProvider: add fuzzy parser to allow all sorts of date formats
- lubridate not an option, too many deps
- https://github.com/gaborcsardi/parsedate maybe, but no time zone support that I need
- https://cran.r-project.org/web/packages/anytime/ Rcpp and BH though, pretty heavy, though we do already import tibble, so Rcpp is already needed
gabor suggested calling as.POSIXlt
on the result https://github.com/gaborcsardi/parsedate/issues/25
as.POSIXlt(parsedate::parse_date("January 4, 1981 15:00:00"), tz="UTC")
#> [1] "1981-01-04 15:00:00 UTC"
seems to do the job. will investigate further.
also do performance comparisons