charlatan icon indicating copy to clipboard operation
charlatan copied to clipboard

DateTimeProvider: add fuzzy parser to allow all sorts of date formats

Open sckott opened this issue 6 years ago • 1 comments

  • 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

sckott avatar Feb 14 '19 18:02 sckott

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

sckott avatar Feb 14 '19 19:02 sckott