Optimize date parsing using strptime
This commit is contained in:
parent
ce4075a507
commit
8d3c7d9bd4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user