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
def parse_date(row)
Date.iso8601(row[0])
rescue ArgumentError => _e
Date.strptime(row[0], "%Y-%m-%d")
rescue
nil
end
end