uwdata / arquero

Query processing and transformation of array-backed data tables.
https://idl.uw.edu/arquero
BSD 3-Clause "New" or "Revised" License
1.22k stars 64 forks source link

iso-date-string: add check for invalid dates #339

Closed calvinfo closed 7 months ago

calvinfo commented 7 months ago

This commit adds a check and tests for invalid dates which still might pass a regex test. I found this is common with government datasets which include years in the format: "2017-18". Technically it still passes the YYYY-MM check, but should not be treated as a date.

const t = aq.fromCSV("year\n2019-20\n2021-22")
t.get('year', 0) // Invalid Date