regularize date function only respects first possible argument
mbannert opened this issue · 0 comments
mbannert commented
because class(x)[1] "Date" class is not respected, if it's not POSIXct – it's not working.
Error in regularize_date(x$time) :
class(x)[1] %in% c("POSIXct", "Date") is not TRUE
This causes problems when using the popular fread function from data.table because they return c("IDate","Date") none of which is POSIXct. I believe one should definitely use inherits here instead of class.
Fill provide PR fix.