alan-turing-institute / eider

eider: an R package for processing health records declaratively
https://alan-turing-institute.github.io/eider/
Other
2 stars 0 forks source link

investigate how comparisons work with dates #17

Closed yongrenjie closed 6 months ago

yongrenjie commented 7 months ago

presumably dates are passed in as strings after being read from csv (raw tables) and/or json (feature spec)

do we try to use heuristics to detect when some string is a date and then compare it properly? or does string comparison suffice (feels iffy--- that only works if dates are in YYYYMMDD format)

yongrenjie commented 7 months ago

lubridate::ymd() returns NA for anything that isn't in YYMMDD or YYYYMMDD format (hyphens are ok), so it suffices to run that on every column to check if there are any NAs, and if there aren't, convert that column.