Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Fix the parsing of dates #26

Merged
merged 2 commits into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GBIF"
uuid = "ee291a33-5a6c-5552-a3c8-0f29a1181037"
authors = ["Timothée Poisot <timothee.poisot@umontreal.ca>"]
version = "0.2.0"
version = "0.2.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
6 changes: 5 additions & 1 deletion src/types/GBIFRecords.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ function format_date(o, d)
if t === nothing || ismissing(t)
return missing
else
return DateTime(t[1:19])
try
return DateTime(t[1:19])
catch
return missing
end
end
end

Expand Down