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

Commit

Permalink
Merge pull request #26 from EcoJulia/bug/date-parsing
Browse files Browse the repository at this point in the history
Fix the parsing of dates
  • Loading branch information
tpoisot authored Apr 5, 2020
2 parents 66dc5e0 + fa143a7 commit 5ea97e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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 <[email protected]>"]
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

2 comments on commit 5ea97e7

@tpoisot
Copy link
Member Author

@tpoisot tpoisot commented on 5ea97e7 Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/12267

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" 5ea97e72a61bc82b7578ab30d5631824140ac2cb
git push origin v0.2.1

Please sign in to comment.