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