1
0

Optimize date parsing using strptime

This commit is contained in:
Tim Kächele 2021-11-20 21:54:02 +01:00
parent ce4075a507
commit 8d3c7d9bd4

View File

@ -32,8 +32,8 @@ module PlanetExpress
end end
def parse_date(row) def parse_date(row)
Date.iso8601(row[0]) Date.strptime(row[0], "%Y-%m-%d")
rescue ArgumentError => _e rescue
nil nil
end end
end end